历史订单 赠送
退款库存 回滚 日志打印 截断200
This commit is contained in:
@@ -14,14 +14,11 @@ import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;
|
||||
|
||||
import java.net.http.HttpResponse;
|
||||
|
||||
|
||||
/**
|
||||
* 方法调用统一切面处理
|
||||
*
|
||||
* @author ww
|
||||
*/
|
||||
@Aspect
|
||||
@@ -45,7 +42,7 @@ public class ControllerAspect {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (args[i] instanceof HttpServletRequest || args[i] instanceof HttpServletResponse) {
|
||||
args[i] = null;
|
||||
}else if (args[i] instanceof MultipartFile) {
|
||||
} else if (args[i] instanceof MultipartFile) {
|
||||
args[i] = "上传图片";
|
||||
}
|
||||
}
|
||||
@@ -63,16 +60,19 @@ public class ControllerAspect {
|
||||
ThreadUtil.execAsync(() -> {
|
||||
//请求的参数
|
||||
String resultJson = JSONObject.toJSONString(result);
|
||||
if (StrUtil.isNotBlank(resultJson) && resultJson.length() > 200) {
|
||||
resultJson = resultJson.substring(0, 200);
|
||||
}
|
||||
try {
|
||||
if (StrUtil.isNotBlank(resultJson) && !"null" .equals(resultJson)) {
|
||||
if (StrUtil.isNotBlank(resultJson) && !"null".equals(resultJson)) {
|
||||
log.info("""
|
||||
|
||||
>>>>>> {} {}
|
||||
>>>>>> IP: {}
|
||||
>>>>>> execute time:{}ms
|
||||
>>>>>> Request: {}
|
||||
>>>>>> Response: {}
|
||||
""",
|
||||
>>>>>> {} {}
|
||||
>>>>>> IP: {}
|
||||
>>>>>> execute time:{}ms
|
||||
>>>>>> Request: {}
|
||||
>>>>>> Response: {}
|
||||
""",
|
||||
method, requestUrl, requestIp, useTime,
|
||||
params,
|
||||
resultJson
|
||||
|
||||
Reference in New Issue
Block a user