首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否缺少grails bootstrap文件上传插件的资源?

是否缺少grails bootstrap文件上传插件的资源?
EN

Stack Overflow用户
提问于 2014-06-27 05:32:40
回答 1查看 418关注 0票数 1

我正在尝试在我的grails应用程序(http://grails.org/plugin/bootstrap-file-upload)中使用grails引导程序文件上传插件。

我的grails版本是2.2.1。插件版本为2.1.2。插件安装成功。我还安装了twitter-bootstrap -3.1.1.3插件。我正在尝试使用upload插件的UI风格。需要包含哪些资源。插件的文档中并没有提到这一点。

目前,我包括以下内容。

代码语言:javascript
复制
<r:require module="bootstrap"/>
<r:require module="bootstrap-file-upload"/>

然而,我得到了以下错误。

代码语言:javascript
复制
java.lang.RuntimeException: It looks like you are missing some calls to the r:layoutResources tag. After rendering your page the following have not been rendered: [defer]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:

BuildConfig.groovy

代码语言:javascript
复制
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.7
grails.project.source.level = 1.7
grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // specify dependency exclusions here; for example, uncomment this to disable ehcache:
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve
    legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility

    repositories {
        inherits false // Whether to inherit repository definitions from plugins
        grailsPlugins()
        grailsHome()
        mavenRepo 'http://nexusserver/nexus/content/groups/public/'
    }

    dependencies {
        //mysql
        provided 'mysql:mysql-connector-java:5.1.16'
        //joda
        compile "joda-time:joda-time:2.1"
    }

    plugins {
        compile ":hibernate:$grailsVersion"
        compile ":resources:1.1.6"
        compile ":zipped-resources:1.0"
        compile ':cache-headers:1.1.6'
        //compile ":cached-resources:1.0"
        //compile ":yui-minify-resources:0.1.5"
        compile ':cache:1.1.6'
        compile ':spring-security-core:1.2.7.3'
        compile ':spring-security-ldap:1.0.6'
        compile ":jquery:1.10.2"
        compile ":jquery-ui:1.10.3"
        compile ":bootstrap-file-upload:2.1.2"
        compile ":excel-import:1.0.0"
        compile ":twitter-bootstrap:3.1.1.3"

        //target
        build ":tomcat:$grailsVersion"
    }
}

有人知道怎么解决这个问题吗?

EN

回答 1

Stack Overflow用户

发布于 2014-06-27 12:16:26

请仔细检查您的布局文件(默认为main.gsp)是否有两个<r:layoutResources/>标记,一个在<head>部分,另一个在<body>部分的末尾。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24440619

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档