使用Spring框架时,使用注解就报错.
Caused by: 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: file [D:\Eclipse Luna4.4\eclipse\workspace\testWeb\build\classes\test\A.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:56)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:266)
... 24 more
Caused by: 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)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:53)
... 27 more
事情是这样的,本来使用eclipse4.6.1版本的,使用注释没有问题,后来写SpringMVC配置ok后启动tomcat就报错(不用注释),我就重新下了个4.4.2版本的eclipse,运行可以通过,但是现在发现,这个版本的eclipse使用注解就报错,包括注解注入、组件扫描等.请问这到底是什么问题,?
代码+jar包都是一样的.