<?xml version="1.0" encoding="UTF-8"?>
<beans default-lazy-init="true"
	xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
			http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
			http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
			http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd">
	<!-- AOP Configuration -->
	<tx:annotation-driven transaction-manager="transactionManager" />
	<tx:advice id="txAdvice2" transaction-manager="transactionManager">
		<tx:attributes>
			<tx:method name="add*" propagation="REQUIRED" />
			<tx:method name="save*" propagation="REQUIRED" />
			<tx:method name="update*" propagation="REQUIRED" />
			<tx:method name="edit*" propagation="REQUIRED" />
			<tx:method name="delete*" propagation="REQUIRED" />
			<tx:method name="insert*" propagation="REQUIRED" />
			<!--<tx:method name="*" propagation="REQUIRED" timeout="1000" />-->
		</tx:attributes>
	</tx:advice>
	<!-- 表示使用cglib，而非JDK的动态代理，因为Controller没有实现接口，所以要配置这里 -->
	<aop:aspectj-autoproxy proxy-target-class="true" />

	<aop:config>
		<!-- 事务 -->
		<aop:advisor id="servicesPointcut" advice-ref="txAdvice2"
			pointcut="execution(* com.house365.ws.service..*..impl..*(..))" order="2" />
		<aop:advisor id="servicesPointcut" advice-ref="txAdvice2"
					 pointcut="execution(* com.house365.ws.interfaces..*..impl..*(..))" order="2" />
	</aop:config>
</beans>
