Failed to load ApplicationContext怎么破
Failed to load ApplicationContext这个怎么破啊。。。是在想不出来,@ContextConfiguration("classpath:spring-transaction.xml")也加了这句话,JDK也是1.6版本的。就是在.xml文件里面的内容不一样
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
<!--配置c3p0连接池 -->
<bean id="datasource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://localhost:3306/spring-transaction?useUnicode=true&characterEncoding=utf-8"></property>
<property name="username" value="root"/>
<property name="password" value="123456" />
</bean>
<!--配置业务层类 -->
<bean id="accountService" class="cn.pyh.spring.demo1.AccountServiceImpl">
<property name="accountDao" ref="accountDao"></property>
</bean>
<!-- 配置DAO的类 -->
<bean id="accountDao" class="cn.pyh.spring.demo1.AccountDaoImpl">
<property name="datasource" ref="datasource"></property>
</bean>
</beans>