已进行mapper层,dataSource的测试也显示同一个异常:
Test类:
public class Test {
ApplicationContext ac;
@Before
public void Before(){
ac=new ClassPathXmlApplicationContext(new String[]{"classpath*:spring-mybatis.xml"});
}
@org.junit.Test
public void Test1(){
Object s=ac.getBean("propertyConfigurer");
System.out.println(s);
}
}
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'propertyConfigurer' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1168)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
at com.dao.Test.Test1(Test.java:26)
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。