AOP学习之环绕通知类型的学习
around步骤:1.在通知类中写@around注解(
@Around("execution(* com.itheima.dao.BookDao.method2(..))")
)
2.构造带参的方法public Object method2Around(ProceedingJoinPoint point) throws Throwable{在方法中创建参数调用原始方法proceed方法,然后利用cry,cath异常可直接进行前置,后置,异常通知,利用参数值来返回信息
3.
方法创建完成后在第一步对应位置创建好方法,并在测试类中进行启动

 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号