hibernate spring 事务配置

<tx:advice id="txAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <tx:method name="save*" propagation="REQUIRED" />
            <tx:method name="delete*" propagation="REQUIRED" />
            <tx:method name="update*" propagation="REQUIRED" />
            <tx:method name="get*" read-only="true" propagation="NOT_SUPPORTED" />
            <tx:method name="find*" read-only="true" propagation="NOT_SUPPORTED" />
        </tx:attributes>
    </tx:advice>

    <aop:config>
        <aop:pointcut id="memberDaoCut" expression="bean(memberDao)" />
        <aop:advisor pointcut-ref="memberDaoCut" advice-ref="txAdvice" />
    </aop:config>

 

posted @ 2013-10-11 09:56  holycrap  阅读(136)  评论(0编辑  收藏  举报