0
我在Grails中測試了Spring Security Core Plugin,並在腳手架生成的視圖中遇到了一些問題。Grails腳手架和彈簧安全核心 - 實體'hellip'未定義
我有一個簡單域類 - 人:
package test
class Person {
static constraints = {
}
String name
Date dob
}
藉助於此,我使用的生成的grails-all命令以產生所述控制器和視圖。在這一點上一切都很完美,而且這個視圖完美無缺。
然後我繼續用Spring Security Core來保護我的應用程序。添加以下行到我的build.gradle:
compile 'org.grails.plugins:spring-security-core:3.0.3'
,並運行以下S2-快速啓動命令,以確保我的應用程序
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的核心插件之前工作的索引頁,現在是給我這個錯誤:
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>
沒有任何人有這個問題?我該如何解決這個問題?
在此先感謝。
乾杯, 不久
我以前使用的是grails 3.0.4版本。 –