A-O-P配置事务
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
xmlns:aop="http://www.springframework.org/schema/aop "
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd ">
<!-- 配置通知Bean -->
<bean id="loggerBean" class="com.aptech.aop.LoggerBean" />
<!-- 配置目标对象 -->
<bean id="aopBean" class="com.aptech.aop.AOPBean"/>
<aop:config>
<!-- 配置切入点 -->
<aop:pointcut id="loggerCalls" expression="execution(* com.aptech.aop.AOPBean.display(..))" />
<!-- 配置切面 -->
<aop:aspect id="logAspect" ref="loggerBean">
<!-- 配置环绕通知 -->
<aop:around pointcut-ref="loggerCalls" method="aroundLogCalls" />
</aop:aspect>
</aop:config>
</beans>