Я пытаюсь обновить свое приложение с Grails 2.4.4 до Grails 3.0.2, и у меня возникла проблема с аннотацией spring.
У меня есть контроллер, например:
import grails.plugins.springsecurity.annotation.Secured
class MyController {
@Secured(['ROLE_ADMINS_GROUP'])
def index() {
// some code
}
}
В блоке depencencies
в build.gradle
у меня есть это:
dependencies {
provided 'org.springframework.boot:spring-boot-starter-logging'
provided "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.springframework.boot:spring-boot-starter-security"
provided "org.grails:grails-web-boot"
provided "org.grails:grails-dependencies"
provided 'javax.servlet:javax.servlet-api:3.1.0'
testCompile "org.grails:grails-plugin-testing"
console "org.grails:grails-console"
compile "org.grails.plugins:wslite:0.7.2.0"
}
Когда я пытаюсь скомпилировать свое приложение, я получаю сообщение об ошибке.
MyController.groovy: 4: unable to resolve class grails.plugins.springsecurity.annotation.Secured
@ line 4, column 1.
import grails.plugins.springsecurity.annotation.Secured
^