Java Exception: ASM ClassReader failed to parse class file
今天跑项目的时候报了这样一个错误:
org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
stackoverflow上面的解释:
Note that the Java 8 bytecode level (-target 1.8, as required by -source 1.8) is only fully supported as of Spring Framework 4.0. In particular, Spring 3.2 based applications need to be compiled with a maximum of Java 7 as the target, even if they happen to be deployed onto a Java 8 runtime. Please upgrade to Spring 4 for Java 8 based applications.
就是说java8的字节码级别支持spring4的,编译spring3.2最高只能用java7的版本。用java7编译之后的代码可以在java8的环境里运行的。所以在eclipse里设置编译的java版本为1.7就可以解决问题。
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦