我正在尝试为我的grail项目添加spring-security,但编译时失败。以下是我在BuildConfig.groovy中拥有的插件:`//用于构建系统的插件仅构建“:tomcat:7.0.54”
// plugins for the compile step
compile ":scaffolding:2.1.1"
compile ':cache:1.1.6'
compile ":asset-pipeline:1.8.11"
compile ":mongodb:3.0.1"
compile ":spring-security-core:2.0-RC3"
// plugins needed at runtime but not for compilation
//runtime ":hibernate4:4.3.5.4" // or ":hibernate:3.6.10.16"
runtime ":jquery:1.11.1"`
编译失败,我收到此致命错误消息:
编译期间发生致命错误java.lang.NoClassDefFoundError:net / sf / ehcache / config / CacheConfiguration
我按照此处的说明进行操作,但是在“ grails编译”步骤之后陷入困境。我尝试在插件列表中添加ehcache依赖项,但随后提示无法下载。我不知道该怎么办。该项目非常简单,我只是从之前给出的链接开始了本教程。我只是卸载了hibernate,而是安装了mongodb。
您应该将ehcache添加到依赖项而不是插件中。
dependencies {
compile "net.sf.ehcache:ehcache-core:2.4.8"
}
我认为spring-security-core不需要休眠。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句