1、创建被增强类和增强类
2、创建上面两个类的对象
3、配置切入点和切入面
4、使用完全注解开发
@Configuration表示是一个配置类
@ComponentScan(basePackages = {"com.ma.spring5"})相当于开启组件
@EnableAspectJAutoProxy(proxyTargetClass = true)开启Aspect生成代理对象
1、创建被增强类和增强类
2、创建上面两个类的对象
3、配置切入点和切入面
4、使用完全注解开发
@Configuration表示是一个配置类
@ComponentScan(basePackages = {"com.ma.spring5"})相当于开启组件
@EnableAspectJAutoProxy(proxyTargetClass = true)开启Aspect生成代理对象