这是编写的applicationConext.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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="dao" class="org.gestion.bp.dao.BanqueDaoImp"></bean>
<bean id="metier" class="org.gestion.bp.metier.BanqueMetierImp"></bean>
<property name="dao" ref="dao"></property>
</beans>
错误的地方:
<bean id="metier" class="org.gestion.bp.metier.BanqueMetierImp"></bean>
<property name="dao" ref="dao"></property>
</beans>
应修改为:
<bean id="metier" class="org.gestion.bp.metier.BanqueMetierImp">
<property name="dao" ref="dao"></property>
</bean>
</beans>