Spring 版本与JDK 版本导致的兼容问题
本地jdk 版本1.8 Spring core包版本 3.2.0.RELEASE
发生报错:
Exception in thread "main" java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
原文索引:
stackoverflow是这么回答的:
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
将Spring 版本升级到4.0.9.RELEASE 后完美解决此问题