Tôi không thể sử dụng giao diện người dùng bảo mật Grails (0.1.2) với Grails 2.0. Tôi đã googled các nguyên nhân có thể gây ra lỗi sau và cũng đã thử các bản sửa lỗi được đề xuất nhưng chúng dường như không hoạt động. Tôi đã thử, ghi đè giao diện người dùng, tôi cũng đã thử phiên bản Grails 2.0-m2.Giao diện người dùng bảo mật mùa xuân và grails 2.0
| 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
Sau đây là main.gsp của tôi (một số mã/bình luận được loại bỏ cho ngắn gọn)
<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…"/></div>
<g:javascript library="application"/>
<r:layoutResources />
</body>
Cảm ơn bạn đã giải quyết nó. – Sap
Bạn đã xóa cuộc gọi g: javascipt nào - các cuộc gọi trong plugin heSecurityUI plugin reqister và auth gsps? (Bằng cách làm s2ui-ghi đè, tôi giả sử?) Bạn có thể chia sẻ các module tài nguyên kết quả? – Wayne
Trong trường hợp của tôi, tôi đã đăng ký bị ghi đè; Tôi đã xóa g: javascript trong bố cục register.gsp (mặc dù chúng đã được nhận xét) và sự cố đã biến mất. –