标签:
配置注入action,dao层,service层
<!-- action --> <bean id="userAction" class="cn.lt.action.UserAction" scope="prototype"> <property name="userService" ref="userService"></property> </bean> <!-- service --> <bean id="userService" class="cn.lt.service.UserService"> <property name="userDao" ref="userDao"></property> </bean> <!-- dao --> <bean id="userDao" class="cn.lt.dao.UserDao"> <property name="sessionFactory" ref="sessionFactory"></property> </bean> <!-- Questions --> <bean id="questionsAction" class="cn.lt.action.QuestionsAction" scope="prototype"> <property name="questionsService" ref="questionsService"></property> </bean> <bean id="questionsService" class="cn.lt.service.QuestionsService"> <property name="questionsDao" ref="questionsDao"></property> </bean> <bean id="questionsDao" class="cn.lt.dao.QuestionsDao"> <property name="sessionFactory" ref="sessionFactory"></property> </bean>
<!-- fraction -->
<bean id="fractionAction" class="cn.lt.action.FractionAction" scope="prototype">
<property name="fractionService" ref="fractionService"></property>
</bean>
<bean id="fractionService" class="cn.lt.service.FractionService">
<property name="fractionDao" ref="fractionDao"></property>
</bean>
<bean id="fractionDao" class="cn.lt.dao.FractionDao">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
通过sping3 +Hibernate4+StrutsMVC实现 考试管理系统 逻辑 一 --Spring配置
标签:
原文地址:http://www.cnblogs.com/PeachLuffy/p/5635566.html