直接上代码:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="UserDao" class="com.iotek.second.UserDao"></bean>
<bean id="UserService" class="com.iotek.second.UserService" p:UserDao-ref="UserDao"></bean>
<bean id="UserAction" class="com.iotek.second.UserAction" p:UserService-ref="UserService"></bean>
</beans>
网友评论