Spring3.2和java8,你不得不知道的事

问题来源:

最近重装了系统,整了个java8玩玩。然后,就是悲剧上演了

以前的一个项目,什么都没改,直接运行,然后就:


Spring3.2和java8,你不得不知道的事_第1张图片


没有其它具体有用的提示,就是说Spring 的context和Listener都启动不了。


首先想到,难道web.xml配置出错啦?为什么在Spring启动那步出错啦?可是代码没改过啊~~

程序员太多疑了,没有一直坚持。。其实一开始,我就坚持这一点,就不会盲目了。


解决方案:

http://stackoverflow.com/questions/24128045/spring-context-initialization-failed-with-java-lang-illegalargumentexception-whi

http://stackoverflow.com/questions/22730801/java-se-spring-data-hibernate


摘记:

The exception you see is not very likely to be cause by invalid Spring configuration but your classpath setup. This feels like a version incompatibility regarding the ASM libraries and Java 8. The ASM version, Spring 3.2 depends on is known to be incompatible with Java 8.

Thus, if you want run your code with Java 8, you need to use a recent Spring 4.0 version.




你可能感兴趣的:(java,spring)