Grails 3.1和spring-security-core:3.0.3

时间:2016-01-29 06:13:55

标签: java spring grails intellij-idea spring-security

当我尝试使用

grails s2-quickstart com.kanabang secUser secRole

它在控制台中显示以下内容。

Error |
Error occurred running Grails CLI: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
GStringTemplateScript1.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

无法创建bean。

我的依赖

dependencies {
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-dependencies"
    compile "org.grails:grails-web-boot"

    compile "org.grails.plugins:hibernate"
    compile "org.grails.plugins:cache"
    compile "org.hibernate:hibernate-ehcache"
    compile "org.grails.plugins:scaffolding"

    compile 'org.grails.plugins:spring-security-core:3.0.3'
    runtime "org.grails.plugins:asset-pipeline"

    testCompile "org.grails:grails-plugin-testing"
    testCompile "org.grails.plugins:geb"

    // Note: It is recommended to update to a more robust driver (Chrome, Firefox etc.)
    testRuntime 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.44.0'

    console "org.grails:grails-console"
}

这是一个错误还是错误的配置。?

请注意:我正在使用 intellij 15

1 个答案:

答案 0 :(得分:1)

经过一些测试。

我尝试使用mingw64来构建应用程序。

它成功创建了域类。

在此之前。我需要在路径中添加grails_home。

我感谢这是关键点。