yangys
2024-05-09 60e317f7782c718d28920060fd686d2092c99c1e
smart-starter-log/src/main/java/com/qianwen/core/log/aspect/RequestLogAspect.java
@@ -1,46 +1,44 @@
package com.qianwen.core.log.aspect;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.qianwen.core.launch.log.BladeLogLevel;
import com.qianwen.core.log.props.BladeRequestLogProperties;
import com.qianwen.core.tool.jackson.JsonUtil;
import com.qianwen.core.tool.utils.ClassUtil;
import com.qianwen.core.tool.utils.StringUtil;
import com.qianwen.core.tool.utils.WebUtil;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.MethodParameter;
import org.springframework.core.io.InputStreamSource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.multipart.MultipartFile;
import com.qianwen.core.launch.log.BladeLogLevel;
import com.qianwen.core.log.props.BladeRequestLogProperties;
import com.qianwen.core.tool.jackson.JsonUtil;
import com.qianwen.core.tool.utils.ClassUtil;
import com.qianwen.core.tool.utils.StringUtil;
import com.qianwen.core.tool.utils.WebUtil;
@Aspect
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(value = {"blade.log.request.enabled"}, havingValue = "true", matchIfMissing = true)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
/* loaded from: blade-starter-log-9.3.0.0-SNAPSHOT.jar:org/springblade/core/log/aspect/RequestLogAspect.class */
public class RequestLogAspect {
    private static final Logger log = LoggerFactory.getLogger(RequestLogAspect.class);
    private final BladeRequestLogProperties properties;
@@ -49,7 +47,7 @@
        this.properties = properties;
    }
    @Around("execution(!static org.springblade.core.tool.api.R *(..)) && (@within(org.springframework.stereotype.Controller) || @within(org.springframework.web.bind.annotation.RestController))")
    @Around("execution(!static com.qianwen.core.tool.api.R *(..)) && (@within(org.springframework.stereotype.Controller) || @within(org.springframework.web.bind.annotation.RestController))")
    public Object aroundApi(ProceedingJoinPoint point) throws Throwable {
        BladeLogLevel level = this.properties.getLevel();
        if (BladeLogLevel.NONE == level) {