尝试使用 2.4.0.RC1 启动并运行我们的应用程序,但我不断遇到此错误:
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugin.cache.CustomCacheKeyGenerator]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator
... 4 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator
at grails.plugin.cache.CustomCacheKeyGenerator.<init>(CustomCacheKeyGenerator.java:46)
... 4 more
Caused by: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName(Class.java:190)
at grails.plugin.cache.CustomCacheKeyGenerator.<init>(CustomCacheKeyGenerator.java:43)
... 4 more
我已升级到最新版本的缓存 (1.1.6)。似乎与 spring 缓存内容存在某种版本冲突,但我检查了依赖关系报告,没有发现任何异常情况。
还有其他人遇到这个问题并有解决方案吗?
最佳答案
事实证明,spring-integration-core
版本 3.0.3 包含了我错过的旧版本 spring-context。
升级到 spring-integration-core
版本 4.0.0 使用与 Grails 相同版本的 Spring 4。
关于grails - ClassNotFoundException : SimpleKeyGenerator upgrading to Grails 2. 4.0.RC1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23588571/