67,513
社区成员
发帖
与我相关
我的任务
分享
<!-- aop 切入事务管理到 -->
<tx:advice id="txAdvice" transaction-manager="jotm_txManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" rollback-for="Exception" />
<tx:method name="insert*" propagation="REQUIRED" rollback-for="Exception" />
<tx:method name="del*" propagation="REQUIRED" rollback-for="Exception" />
<tx:method name="update*" propagation="REQUIRED" rollback-for="Exception" />
<tx:method name="mod*" propagation="REQUIRED" rollback-for="Exception" />
<tx:method name="*" propagation="SUPPORTS" read-only="true" />
</tx:attributes>
</tx:advice>
<!-- cglib代理service -->
<aop:config proxy-target-class="false">
<aop:pointcut id="allServiceMethod" expression="execution (* com.sinosoft.perfect.*.*.service.*.*(..))
|| execution (* com.sinosoft.perfect.*.service.*.*(..))"/>
<aop:advisor order="1" advice-ref="txAdvice" pointcut-ref="allServiceMethod" />
<aop:aspect id="loggerAspect2" ref="genericLoggerBean2" order="1000">
<aop:around pointcut-ref="allServiceMethod" method="invoke" />
</aop:aspect>
</aop:config>
<!-- aop 切入日志 -->
<aop:config proxy-target-class="true">
<aop:aspect id="loggerAspect" ref="genericLoggerBean">
<aop:around pointcut="execution(* com.sinosoft.perfect.*.*.action.*.*(..))
||execution(* com.sinosoft.perfect.common.action.*.*(..))" method="invoke" />
</aop:aspect>
</aop:config>
<!-- aop 切入日志 -->
<bean id="genericLoggerBean" class="com.sinosoft.perfect.common.bean.GenericLoggerBean"></bean>
<bean id="genericLoggerBean2" class="com.sinosoft.perfect.common.bean.GenericLoggerBean2"></bean>