package com.example.aop;
import com.alibaba.fastjson.JSON;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
*@author: youthcool
*@date: 2019/9/6
*@description: 请求参数Log
*/
@Component
@Aspect
public class ControllerLog {
private final static Logger logger= LoggerFactory.getLogger(ControllerLog.class);
@Pointcut("execution(* com.example.controller..*(..))")
public void controller() { }
@Before("controller()")
public void doBefore(JoinPoint joinPoint) {
S
Spring Controller请求参数Log
最新推荐文章于 2022-06-24 12:24:05 发布