SSH框架错误:ERROR ContextLoader:220 - Context initialization failed

SSH框架错误:ERROR ContextLoader:220 - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'yonyou.ac.pdaserver.dao.imp.TbUserDaoImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [beans.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [beans.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dataSource' is defined
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)

 

applicationContext.xml文件里面的bean 的id写成name属性了,把所有bean name属性改成id.

你可能感兴趣的:(SSH)