spring的通用事务管理机制

	<tx:advice id="serviceAdvice">
		<tx:attributes>
			<tx:method name="get*" read-only="true"/>
			<tx:method name="*" rollback-for="java.lang.Exception"/>
		</tx:attributes>
	</tx:advice>
	
	<aop:config>
		<aop:pointcut id="servicePointcut" expression="execution(* cn.iwoo.service.*.*(..))"/>
		<aop:advisor pointcut-ref="servicePointcut" advice-ref="serviceAdvice"/>
	</aop:config>

你可能感兴趣的:(java,spring)