org.springframework.beans.factory.BeanCreationException: Error creating bean with name 解决办法
本人在运行idea Demo时出出现的
Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException:
后面的错误也是围绕这两个
.CannotLoadBeanClassException
UnsupportedClassVersionError:
打开Java Compiler
file----->settings---->Build,Execution,Deployment------>Compiler----->Java Compiler
修改JDK原先1.8版本为1.6或者1.7 再次运行后 成功。
另外本人Tomcat 版本为7
具体原因不了解,希望有大神可以交流交流,