首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Security UI和grails 2.0

Spring Security UI和grails 2.0
EN

Stack Overflow用户
提问于 2012-01-03 13:49:59
回答 3查看 8.5K关注 0票数 9

我不能在grails 2.0中使用Grails安全UI(0.1.2)。我已经在谷歌上搜索了以下错误的可能原因,也尝试了建议的修复方法,但它们似乎不起作用。我已经尝试过了,覆盖了UI,我还尝试了Grails 2.0-m2版本。

代码语言:javascript
复制
| Error 2012-01-02 17:17:12,659 ["http-bio-8080"-exec-5] ERROR [/webdemo].[default]  - Servlet.service() for servlet [default] in context with path [/webdemo] threw exception
Message: It looks like you are missing some calls to the r:layoutResources tag. After rendering your page the following have not been rendered: [head]
   Line | Method
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   908 | run     in     ''
^   619 | run . . in java.lang.Thread

以下是我的main.gsp (为简洁起见,删除了一些代码/注释)

代码语言:javascript
复制
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title><g:layoutTitle default="Grails"/></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
        <link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
        <link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
        <g:layoutHead/>
        <r:layoutResources />
    </head>
    <body>
        <div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails"/></a></div>
        <g:layoutBody/>
        <div class="footer" role="contentinfo"></div>
        <div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt" default="Loading&hellip;"/></div>
        <g:javascript library="application"/>
        <r:layoutResources />
    </body>
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-01-03 22:35:56

尝试删除所有g:javascript调用(即<g:javascript library="application"/>),并通过资源基础设施加载它。

我在这里遇到了完全相同的问题(使用Grails 2.0.1),这似乎解决了它。

如果该解决方案对您也有效,那么您可能需要考虑提交一份错误报告-因为这至少是一个非常令人困惑的错误消息。

票数 8
EN

Stack Overflow用户

发布于 2012-01-03 14:10:23

<head>内部和</body>之前添加<r:layoutResources />标签。

这是Grails Resources Plugin所需的,可以在http://grails-plugins.github.com/grails-resources/ref/Tags/layoutResources.html中找到有关该标签的更多文档

票数 9
EN

Stack Overflow用户

发布于 2013-09-09 01:59:03

我收到了与 It looks like you are missing some calls to the r:layoutResources tag. 相同的消息,代码为

代码语言:javascript
复制
    <g:javascript library='application' />
    <g:layoutHead/>
    <r:layoutResources />

修复了在 layoutHead layoutResources之间移动 <g:javascript/> 调用时的问题

代码语言:javascript
复制
    <g:layoutHead/>
          <g:javascript library='application' />
    <r:layoutResources />
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8708424

复制
相关文章

相似问题

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