@Order(5) @Aspect @Component public class AnnotationInterceptor { private static Logger logger = LogManager.getLogger(AnnotationInterceptor.class.getName()); @Pointcut("@annotation(org.springframework.web.bind.annotation.RequestMapping) || @annotation(org.springframework.web.bind.annotation.GetMapping) || " + "@annotation(org.springframework.web.bind.annotation.PostMapping) || @annotation(org.springframework.web.bind.annotation.PutMapping) || @annotation(org.springframework.web.bind.annotation.DeleteMapping)") public void RequestMapping() { } @Around("RequestMapping()") public Object Interceptor(ProceedingJoinPoint joinPoint) throws Throwable { RequestAttributes ra = RequestContextHolder.getRequestAttributes(); ServletRequestAttributes sra = (ServletRequestAttributes) ra; HttpServletRequest request = sra.getRequest(); // String tok
springboot请求url日志记录
最新推荐文章于 2024-12-12 17:33:42 发布
