AOP注解方式入门程序
创建maven工程,导入坐标。编写接口,完成IOC的操作。步骤略。下面这链接有。
Spring的AOP技术-配置文件方式_m0_52012606的博客-CSDN博客
编写切面类
给切面类添加注解 @Aspect,编写增强的方法,使用通知类型注解声明
1.配置xml扫描注解
<?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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://w