gpt4 book ai didi

grails - 无法在Grails 3中导入grails.plugin.springsecurity.annotation?

转载 作者:行者123 更新时间:2023-12-02 14:14:28 25 4
gpt4 key购买 nike

我一直在关注Burt Beckwith关于Spring Security for Grails 3的教程。我按照教程中的说明安装了build.gradle插件,并运行了s2-quickstart,它似乎运行良好。该项目编译无投诉。

但是当我尝试导入语句

import grails.plugin.springsecurity.annotation.Secured

导入无法识别且无法生成,出现错误
Error:(2, 1) Groovyc: unable to resolve class grails.plugin.springsecurity.annotation.Secured

缺少了什么?

build.gradle的依赖项部分:
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"

最佳答案

通过单击“ View \工具\ Gradle”窗口中的“刷新”图标,我能够解决IntelliJ中的此问题。

关于grails - 无法在Grails 3中导入grails.plugin.springsecurity.annotation?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39562498/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com