【javaweb】Spring与JDK之间的版本冲突问题

(一)报错如下:Bean定义存储异常:无法读取候选组件类
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file
(二)报错原因:Spring与JDK的版本冲突
由官网得知,Spring3.2不能在JDK8的环境下运行,只有Spring4.x才支持JDK8下的编译环境。
(三)解决方法:更换JDK或Spring版本
(四)IDEA更换JDK版本的方法:
File–>Project Structure–>SDKs–>"+"–>JDK–>JDK安装目录–>Project–>选择想要的JDK版本–>Apply
发布了19 篇原创文章 · 获赞 51 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_42370146/article/details/96857979