1.开启AOP注解支持
2.将目标对象类,通知类都通过IOC实例到spring容器中
3.在通知类上加上@Aspect
4.在通知方法上加上@Before、@After、@AfterThrowing、@AfterRturning、@Around
5.在@Before、@After、@AfterThrowing、@AfterRturning、@Around后面声明作用到哪个切点上
AOP面向切片编程的注解开发
最新推荐文章于 2024-03-30 11:16:47 发布
1.开启AOP注解支持
2.将目标对象类,通知类都通过IOC实例到spring容器中
3.在通知类上加上@Aspect
4.在通知方法上加上@Before、@After、@AfterThrowing、@AfterRturning、@Around
5.在@Before、@After、@AfterThrowing、@AfterRturning、@Around后面声明作用到哪个切点上