Maven项目报错:The type org.springframework.beans.BeansException cannot be resolved. It is indirectly ...

一、问题描述


在Main中使用ClassPathXmlApplicationContext启动spring,提示:


The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException

The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files	Provider.java	/dubbo-provider/src/main/java/org/dubbo/provider	line 15	Java Problem


Maven项目报错:The type org.springframework.beans.BeansException cannot be resolved. It is indirectly ..._第1张图片


二、解决方法


在网上找到中说法是添加spring-beans,于是在POM.XML中加入以下依赖:



    org.springframework
    spring-beans
    4.2.5.RELEASE


发现还是报错....然后打开Maven的本地仓库,进行查看


Maven项目报错:The type org.springframework.beans.BeansException cannot be resolved. It is indirectly ..._第2张图片


把这些依赖全部删了,让他从新下载下,然后就可以了。。。 


你可能感兴趣的:(WEB开发)