use*_*110 1 grails spring-security grails-3.0
我一直在关注Burt Beckwith的关于Spring Security for Grails 3的教程.我按照教程中的说法安装了插件build.gradle,并运行了s2-quickstart,这似乎工作正常.该项目无需投诉即可编译.
但是当我尝试import语句时
import grails.plugin.springsecurity.annotation.Secured
Run Code Online (Sandbox Code Playgroud)
导入无法识别,不会构建,但有错误
Error:(2, 1) Groovyc: unable to resolve class grails.plugin.springsecurity.annotation.Secured
Run Code Online (Sandbox Code Playgroud)
少了什么东西?
build.gradle的dependencies部分:
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:hibernate4"
compile "org.hibernate:hibernate-ehcache"
compile 'org.grails.plugins:spring-security-core:3.1.1' //***
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.8.2"
runtime "com.h2database:h2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1208 次 |
| 最近记录: |