Spring 4.1.1和google ehcache注释1.2.0兼容,因为我在Jboss上部署战争时遇到异常:
2014-11-12 09:42:29,721错误 [org.springframework.web.context.ContextLoader](ServerService Thread 池 - 1071)上下文初始化失败: java.lang.NoSuchMethodError: 。org.springframework.expression.spel.SpelParserConfiguration(Lorg / springframework的/表达/ SPEL / SpelCompilerMode; Ljava /郎/类加载器;)V 在 org.springframework.context.expression.StandardBeanExpressionResolver。(StandardBeanExpressionResolver.java:98) [spring-context-4.1.1.RELEASE.jar:4.1.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:553) [spring-context-4.1.1.RELEASE.jar:4.1.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:455) [spring-context-4.1.1.RELEASE.jar:4.1.1.RELEASE] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1] at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8] at org.jboss.as.web.deployment.WebDeploymentService.access $ 000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8] at org.jboss.as.web.deployment.WebDeploymentService $ 1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8] at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_45] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]在java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45] at org.jboss.threads.JBossThread.run(JBossThread.java:122)
搜索时,我发现ehcache 1.2.0版需要spring 3.0.6。
除了降级弹簧版本以使其有效之外,还有其他方法吗?