org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring-controller.xml]
Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\Users\胖多余\Desktop\java项目\ssmbuild\out\artifacts\ssmbuild_war_exploded\WEB-INF\classes\com\along\controller\BookController.class]; nested exception is 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 [C:\Users\胖多余\Desktop\java项目\ssmbuild\out\artifacts\ssmbuild_war_exploded\WEB-INF\classes\com\along\controller\BookController.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61
今天写一个ssm整合的小demo的时候出现了一个BeanDefinition解析异常,读了一下异常信息好像是java版本不支持,然后看了一下Java用的是17,spring-beans是5.1.9。网上也搜了一下报错信息,确认是java版本问题,将其改为Java11后问题解决。
标签:java,factory,springframework,parsing,beans,file,org,class From: https://www.cnblogs.com/panglinglong/p/17586920.html