首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

spring简要的事务配置

2012-09-02 
spring简洁的事务配置bean idsessionFactoryrefsessionFactory //bean--bean idtxManager/

spring简洁的事务配置

<bean id="sessionFactory"ref="sessionFactory" /></bean>--><bean id="txManager"/></property></bean><!-- 配置事务的传播特性 --><tx:advice id="txAdvice" transaction-manager="txManager"><tx:attributes><tx:method name="add*" propagation="REQUIRED" /><tx:method name="*" read-only="true" /></tx:attributes></tx:advice><!-- 那些类的哪些方法参与事务 --><aop:config><aop:pointcut id="allAddMethod"expression="execution(* com.mackie.usermgr.dao.*.*(..))" /><aop:advisor pointcut-ref="allAddMethod" advice-ref="txAdvice" /></aop:config>

热点排行