您的位置:首页 > 编程语言 > Java开发

Spring常用事务配置方式

2014-11-10 16:10 183 查看
<tx:advice id="txAdvice" transaction-manager="transactionManager">

<tx:attributes>

<tx:method name="get*" propagation="SUPPORTS" read-only="true" isolation="DEFAULT"/>

<tx:method name="query*" propagation="SUPPORTS" read-only="true" isolation="DEFAULT"/>

<tx:method name="find*" propagation="SUPPORTS" read-only="true" isolation="DEFAULT"/>

<tx:method name="load*" propagation="SUPPORTS" read-only="true" isolation="DEFAULT"/>

<tx:method name="search*" propagation="SUPPORTS" read-only="true" isolation="DEFAULT"/>

<tx:method name="cu*" propagation="SUPPORTS" read-only="true" isolation="DEFAULT"/>

<tx:method name="*Token*" propagation="NOT_SUPPORTED" read-only="true"/>

<tx:method name="*" propagation="REQUIRED" isolation="DEFAULT" />

</tx:attributes>

</tx:advice>

<aop:config>

<aop:pointcut id="resourcePointcut"

expression="execution(* com.hikvision.ivms6.cms.module.resource.service.impl.*.*(..))" />

<aop:advisor advice-ref="txAdvice" pointcut-ref="resourcePointcut" />

</aop:config>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: