添加Spring安全插件时未找到脚本'S2Quickstart'

 MiMe淘宝店 发布于 2023-02-06 01:43

我键入以下命令来添加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

你完成了

1 个回答
  • 因为你正在使用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
    

    你完成了

    2023-02-06 02:10 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有