The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException(示例代
Posted "啷个哩个啷"
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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了
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(示例代的主要内容,如果未能解决你的问题,请参考以下文章
The constructor StringBuilder(String) is undefined 解决方法
The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException(示例代
[Javascript] ES6 Class Constructors and the Super Keyword
Tip of the Week #74: Delegating and Inheriting Constructors
Tip of the Week #74: Delegating and Inheriting Constructors
java解析json,The constructor JSONObject(String) is undefined,错哪了啊??