spring2

   <!-- transaction -->
    <bean id="MNG04AjaxTransaction" class="jp.co.isid.gfo.guidetour.struts.action.transaction.manage.MNG04AjaxTransaction">
        <property name="userInfoDao" ref="UserInfoDao" />
        <property name="configInfoDao" ref="ConfigInfoDao" />
    </bean>
    <bean id="OPN02AjaxTransaction" class="jp.co.isid.gfo.guidetour.struts.action.transaction.common.OPN02AjaxTransaction">
        <property name="tourInfoDao" ref="TourInfoDao" />
        <property name="tourResInfoDao" ref="TourResInfoDao" />
    </bean>
   
    <bean id="MNG02AjaxTransaction" class="jp.co.isid.gfo.guidetour.struts.action.transaction.manage.MNG02AjaxTransaction">
        <property name="tourInfoDao" ref="TourInfoDao" />
    </bean>
   
    <!-- db -->
    <bean id="CodeNameMstDao" class="jp.co.isid.gfo.guidetour.ibatis.dao.CodeNameMstDAO">
        <property name="sqlMapClient" ref="sqlMapClient" />
    </bean>
    <bean id="UserInfoDao" class="jp.co.isid.gfo.guidetour.ibatis.dao.UserInfoDAO">
        <property name="sqlMapClient" ref="sqlMapClient" />
    </bean>
    <bean id="TourResInfoDao" class="jp.co.isid.gfo.guidetour.ibatis.dao.TourResInfoDAO">
        <property name="sqlMapClient" ref="sqlMapClient" />
    </bean>
    <bean id="TourInfoDao" class="jp.co.isid.gfo.guidetour.ibatis.dao.TourInfoDAO">
        <property name="sqlMapClient" ref="sqlMapClient" />
    </bean>
    <bean id="ConfigInfoDao" class="jp.co.isid.gfo.guidetour.ibatis.dao.ConfigInfoDAO">
        <property name="sqlMapClient" ref="sqlMapClient" />
    </bean>

    <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
        <property name="configLocation" value="classpath:SqlMapConfig.xml"/>
        <property name="dataSource" ref="dataSource"/>
    </bean>

   
    <!-- for deploy
    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" >
        <property name="jndiName">
            <value>java:comp/env/jdbc/commonDataSource</value>
        </property>
    -->
    <!--  for spring container test   -->
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" >
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value=""/>
        <property name="username" value=""/>
        <property name="password" value=""/>
   
    </bean>
   
    <aop:config> 
       <aop:pointcut expression="execution(* jp.co.isid.gfo.guidetour.struts.action.transaction.*.*.*(..))" id="transactionAction"/> 
       <aop:advisor advice-ref="transactionManagerAdivice" pointcut-ref="transactionAction"/>
     </aop:config>
    
    <tx:advice id="transactionManagerAdivice" transaction-manager="transactionManager"> 
       <tx:attributes> 
          <tx:method name="*"  
                    propagation="REQUIRED"  
                    rollback-for="xx.xx.xx..TransactionException" /> 
       </tx:attributes> 
    </tx:advice>
   
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"/>
    </bean>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值