日期:2014-05-17 浏览次数:21010 次
    <!-- Dao是无状态的 是单例的 scope="singleton"
    <bean id="userDao" class="com.test.dao.impl.UserDAOImpl"
        scope="singleton">
        <property name="sessionFactory">
            <ref bean="sessionFactory" />
        </property>
    </bean>
    <bean id="userService"
        class="com.test.service.UserServiceImpl">
        <property name="userDao" ref="userDao"></property>
    </bean>
 -->
 
 
    <!--控制层-->
    <!--id="saveUserAction" 别名--><!-- scope:prototype 生产新的action-->
    
    <bean id="listUserAction"
        class="com.test.action.user.ListUserAction" scope="prototype">
        <property name="service" ref="userService"></property>
    </bean>