![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
AOP
H愚公移山H
欲带皇冠,必承其重!!
展开
-
aspect 中获取http请求
@Around("aa()") public Object Around(ProceedingJoinPoint pjp){ //获取方法名 MethodSignature signature = (MethodSignature) pjp.getSignature(); Method method = signature.getMethod(); //获取注解 Team team= method.getAnnotation(Team.cl...原创 2020-12-23 10:04:59 · 1326 阅读 · 0 评论 -
springboot 整合AOP
说起spring,我们知道其最核心的两个功能就是AOP(面向切面)一、示例应用场景:对所有的web请求做切面做审计日志。1、pom中引入相关依赖import java.util.Date;import javax.servlet.http.HttpServletRequest;import org.aspectj.lang.JoinPoint;import org.aspectj.lang.annotation.AfterReturning;import org.aspectj.l原创 2020-11-12 14:20:52 · 130 阅读 · 0 评论