摘要: 1.首先实现AOP实例的第一步即声明切面类,两种方式(1.基于注解形式@Aspect,2.基于xml配置,一般都通过注解来声明切面类)2.切入点表达式大致也有两种,一种是直接根据方法的签名来匹配各种方法@Pointcut("execution(xxxxxx表达式)"),另一种即标题的通过自定义注解的 阅读全文
posted @ 2019-08-21 18:00 不死码农 阅读(1735) 评论(0) 推荐(0)
摘要: 在Spring 3.2中,新增了@ControllerAdvice、@RestControllerAdvice 注解,可以用于定义@ExceptionHandler、@InitBinder、@ModelAttribute,并应用到所有@RequestMapping、@PostMapping, @Ge 阅读全文
posted @ 2019-08-21 17:56 不死码农 阅读(12511) 评论(0) 推荐(1)