Spring 自动关闭Connection 与
无关,tx:advice 只与事物有关
数据库连接Connection的关闭与tx:advice和<aop:config>无关
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<!--<tx:method name="*TM" rollback-for="com.ultrapower.accredit.common.exception.CustomException"/>
<tx:method name="*Batch" rollback-for="com.ultrapower.accredit.common.exception.CustomException"/>
<tx:method name="save*" />
<tx:method name="remove*" />
<tx:method name="insert*" />
<tx:method name="update*" />
<tx:method name="delete*" />
<tx:method name="*" read-only="true" />
-->
<tx:method name="save*" />
</tx:attributes>
</tx:advice>
无关,tx:advice 只与事物有关
数据库连接Connection的关闭与tx:advice和<aop:config>无关
<aop:config>
<!--<aop:pointcut id="allDAO" expression="execution(* com.ultrapower.accredit.dao.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allDAO"/>
--><aop:advisor pointcut="execution(* com.ultrapower.pasm.log.dao.impl.*.*(..))" advice-ref="txAdvice" />
</aop:config>