<aop:aspectj-autoproxy proxy-target-class="true"></aop:aspectj-autoproxy>
<!-- 配置包扫描 --> <context:component-scan base-package="com.cdsxt"></context:component-scan>
4.在class上添加注解: dao: @Repository 增强类: @Component + @Aspect 5.在增强类中的方法上添加注解 @After @Before(value="pointcut()") @AfterReturning @AfterThrowing @Around 重用切入点表达式 1.定义一个空方法 2.在空方法上添加注解@Pointcut 3.在value属性中声明切入点表达式 4.在其他的切入点表达式中 使用方法名+括号来重用切入点表达式 多个切面作用在一个切点上时, 配置优先级 order属性(xml配置) @Order注解(注解配置)