我键入以下命令来添加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
我怎么解决这个问题?
UPDATE
| 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.
Hussain Akht.. 10
因为你正在使用2.3.4 install-plugin已被弃用
这是你做的
第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
你完成了
因为你正在使用2.3.4 install-plugin已被弃用
这是你做的
第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
你完成了