【发布时间】:2016-05-06 19:18:30
【问题描述】:
当我尝试使用时
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"
}
是bug还是配置错误?
请注意:我使用的是 intellij 15。
【问题讨论】:
-
感谢 grails 缺少 org.springframework.beans.factory.annotation.Autowired 的库
标签: java spring grails intellij-idea spring-security