我键入以下命令以添加Spring security plugin。
$ grails install-plugin spring-security-core
$ grails s2-quickstart org.example.auth Person Authority
当我输入以上命令时,我得到的是:
| Script 'S2Quickstart' not found, did you mean:
1) Stats
2) DbmListLocks
3) InstallJQuery
4) TestApp
5) DbmClearChecksums
> Please make a selection or enter Q to quit: q
我该如何解决?
更新
| Configuring classpath
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.springframework.security:spring-security-core:jar:3.2.0.RC1, org.springframework.security:spring-security-web:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-core:jar:3.2.0.RC1 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.springframework.security:spring-security-core:jar:3.2.0.RC1, org.springframework.security:spring-security-web:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-core:jar:3.2.0.RC1 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.springframework.security:spring-security-core:jar:3.2.0.RC1, org.springframework.security:spring-security-web:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-core:jar:3.2.0.RC1 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error The following artifacts could not be resolved: org.springframework.security:spring-security-core:jar:3.2.0.RC1, org.springframework.security:spring-security-web:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-core:jar:3.2.0.RC1 in grailsCentral (http://repo.grails.org/grails/plugins)
| Run 'grails dependency-report' for further information.
请您参考如下方法:
因为您正在使用2.3.4
不建议安装插件
这是你在做什么
步骤1:打开BuilConfig.groovy
第2步:将此行添加到存储库中
mavenRepo "http://repo.spring.io/milestone/"
repositories {
mavenRepo "http://repo.spring.io/milestone/"
}
第3步:在插件代码段中添加此行
compile ":spring-security-core:2.0-RC2"
plugins {
compile ':spring-security-core:2.0-RC2'
}
步骤4:执行命令
grails compile
步骤5:执行命令
s2-quickstart
你完成了




