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

人生难得几回搏,此时不搏待何时。这篇文章主要讲述The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException(示例代相关的知识,希望能为你提供帮助。
“The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException”
“构造函数ClassPathXmlApplicationContext(字符串)是指缺失类型BeansException”
出现错误的原因:jar没有正确引入,即使表面上你能import包。

import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;

如果你用的eclipes解决 方案:
  进入你的maven仓库,本地的,删除关于spring-core,spring-context,删除了之后,让工具重新下载一下
然后update maven一下   就ok了
The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException(示例代

文章图片

 
 
package zy.test; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class TestUser {@Test public void Test(){ ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); }}

---哦了
 
 
     
   
【The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException(示例代】 

    推荐阅读