Spring版本過低問題
阿新 • • 發佈:2019-02-01
- 環境資訊:
- Spring 3.2.10, JDK 1.8, hibernate 4
- 錯誤提示
Caused by:org.springframework.beans.factory.BeanDefinitionStoreException:Failedtoreadcandidatecomponentclass:file[D:\NewWorkSpace\ep-user\target\test-classes\org\homework\ep\user\base\BaseTest.class]; nested exception is org.springframework.core.NestedIOException: ASM at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290) .............. |
- 問題分析
- ASM ClassReader failed to parse class file”黃色高亮是其中主要的原因。
- 原因是,如果使用JDK8,那麼spring的JAR包最低版本為4.0以上!
- 解決方案
- 使用jdk7
- 升級Spring的jar包為4.0以上!