zoukankan      html  css  js  c++  java
  • 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");
            
        }
    
    }

    ---哦了

         

      

  • 相关阅读:
    《将博客搬至CSDN》
    2015-05-01 至 2015-07-30错误总结
    2015-01-01至2015-04-30错误积累
    2015-07-30 至 2016-03-16错误Note
    2014-11-21错误总结
    Spring 和 SpringMVC 的区别
    spring 容器加载
    Spring注解
    自定义拦截器
    Js闭包
  • 原文地址:https://www.cnblogs.com/zhangyu0217----/p/7550874.html
Copyright © 2011-2022 走看看