码迷,mamicode.com
首页 > 编程语言 > 详细

通过sping3 +Hibernate4+StrutsMVC实现 考试管理系统 逻辑 一 --Spring配置

时间:2016-07-02 17:28:09      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:

配置注入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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!