Unhandled exception: org.springframework.beans.factory.BeanDefinitionStoreException
大家好,我是烤鴨:
? 使用 idea 莫名其妙的錯誤。
無法編譯
異常已經(jīng) catch 住了,提示明顯是有問題的。
再看一下 maven install 的結(jié)果
Error:(99, 100) java: 無法訪問org.springframework.core.env.EnvironmentCapable
找不到org.springframework.core.env.EnvironmentCapable的類文件
Error:(105, 19) java: 無法訪問org.springframework.core.AttributeAccessor
找不到org.springframework.core.AttributeAccessor的類文件
Error:(108, 27) java: 無法訪問org.springframework.core.AttributeAccessorSupport
找不到org.springframework.core.AttributeAccessorSupport的類文件
進(jìn)去看一下源碼,確實(shí)是類沒找到的,但是這個關(guān)于異常的提示有點(diǎn)坑啊。
解決方案
其實(shí)是沒有引入 spring-core 導(dǎo)致的問題。
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core --> <dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>5.2.0.RELEASE</version> </dependency>總結(jié)
以上是生活随笔為你收集整理的Unhandled exception: org.springframework.beans.factory.BeanDefinitionStoreException的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 基于Docker搭建私有镜像仓库
- 下一篇: 数学建模按赛题划分常用代码