我在Grails中测试Spring Security Core插件时遇到了一些由scaffolding生成的视图问题。
我有一个简单的域类- Person:
package test
class Person {
static constraints = {
}
String name
Date dob
}为此,我使用grails generate-all命令来生成控制器和视图。在这一点上,一切都很完美,视图工作得也很完美。
然后我开始用Spring Security Core保护我的应用程序。我将以下行添加到我的build.gradle中:
compile 'org.grails.plugins:spring-security-core:3.0.3'并运行以下s2-quickstart命令来保护我的应用程序
grails s2-quickstart test User Role然后,我使用ROLE_ADMIN权限创建了登录用户,并在我的控制器上添加了以下标记:
@Secured(['ROLE_ADMIN'])
def index(Integer max) {
params.max = Math.min(max ?: 10, 100)
respond Person.list(params), model:[personCount: Person.count()]
}在Spring Security Core插件之前工作的索引页面现在给我这个错误:
This page contains the following errors:
error on line 9 at column 82: Entity 'hellip' not defined
Below is a rendering of the page up to the first error.我发现有问题的行在我的index.gsp中:
<a href="#list-person" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content…"/></a>其他人也有这个问题吗?我该如何解决这个问题?
提前谢谢。
干杯,很快
发布于 2017-08-28 12:22:28
在我升级到grails版本3.3.0和spring security core 3.2.0.M1之后,这个问题已经解决了。
谢谢。
https://stackoverflow.com/questions/45895582
复制相似问题