ssh 框架搭建值得注意的地方

来源:互联网 发布:阿里云cdn刷新预热 编辑:程序博客网 时间:2024/04/28 03:35

1.创建一个Create Web Project

2.<bean id="sessionFactory"
  class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="configLocation"
   value="classpath:hibernate.cfg.xml">
  </property>
 </bean>
 <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
 <property name="sessionFactory">
    <ref bean="sessionFactory" />
 </property>
 </bean>

<bean id="BxUserDAOProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
        <property name="proxyInterfaces">
       <value>com.idao.BxUserIDAO</value>
     </property>
       <property name="transactionManager">
         <ref bean="transactionManager"/>
       </property>
       <property name="target">
         <ref local="BxUserDAO"/>
       </property>
       <property name="transactionAttributes">
         <props>
              <prop key="*">
              PROPAGATION_REQUIRED
           </prop>
         </props>
       </property>
     </bean>

3<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
    <set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/>
  </plug-in>

org.springframework.web.struts.DelegatingActionProxy

原创粉丝点击