Spring事务控制(txManager)

论坛 期权论坛 脚本     
匿名技术用户   2020-12-29 18:32   634   0

<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>


<aop:config>
<aop:advisor pointcut="execution(* com.fone.platform.service..*.*(..))" advice-ref="txAdvice"/>
</aop:config>


<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="l*" propagation="REQUIRED"/>
<tx:method name="a*" propagation="REQUIRED"/>
<tx:method name="d*" propagation="REQUIRED"/>
<tx:method name="e*" propagation="REQUIRED"/>
<tx:method name="*" propagation="SUPPORTS" read-only="true"/>
</tx:attributes>
</tx:advice>

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP