refactor: 移除 web-core,融合 web-core 和 core 模块

1.移除 web-core,融合 web-core 和 core 模块
2.调整部分依赖顺序
This commit is contained in:
2025-05-22 21:49:20 +08:00
parent 4f9e1ba108
commit f83a901626
56 changed files with 166 additions and 256 deletions

View File

@@ -11,7 +11,6 @@
<artifactId>continew-starter-log-aop</artifactId>
<description>ContiNew Starter 日志模块 - 基于 AOP 实现</description>
<dependencies>
<!-- 日志模块 - 核心模块 -->
<dependency>

View File

@@ -25,8 +25,8 @@ import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.core.Ordered;
import org.springframework.lang.NonNull;
import org.springframework.web.filter.OncePerRequestFilter;
import top.continew.starter.web.util.RepeatReadRequestWrapper;
import top.continew.starter.web.util.RepeatReadResponseWrapper;
import top.continew.starter.core.wrapper.RepeatReadRequestWrapper;
import top.continew.starter.core.wrapper.RepeatReadResponseWrapper;
import top.continew.starter.log.model.LogProperties;
import java.io.IOException;

View File

@@ -31,7 +31,7 @@ import top.continew.starter.log.model.AccessLogContext;
import top.continew.starter.log.model.AccessLogProperties;
import top.continew.starter.log.model.LogRecord;
import top.continew.starter.log.util.AccessLogUtils;
import top.continew.starter.web.util.ServletUtils;
import top.continew.starter.core.util.ServletUtils;
import java.lang.reflect.Method;
import java.time.Duration;

View File

@@ -20,7 +20,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import top.continew.starter.core.constant.PropertiesConstants;
import top.continew.starter.log.enums.Include;
import top.continew.starter.web.util.SpringWebUtils;
import top.continew.starter.core.util.SpringWebUtils;
import java.util.ArrayList;
import java.util.List;

View File

@@ -20,7 +20,7 @@ import cn.hutool.core.text.CharSequenceUtil;
import org.springframework.http.HttpHeaders;
import top.continew.starter.core.util.ExceptionUtils;
import top.continew.starter.core.util.IpUtils;
import top.continew.starter.web.util.ServletUtils;
import top.continew.starter.core.util.ServletUtils;
import top.continew.starter.log.enums.Include;
import java.net.URI;

View File

@@ -17,7 +17,7 @@
package top.continew.starter.log.model;
import top.continew.starter.log.enums.Include;
import top.continew.starter.web.util.ServletUtils;
import top.continew.starter.core.util.ServletUtils;
import java.util.Map;
import java.util.Set;

View File

@@ -18,12 +18,11 @@ package top.continew.starter.log.util;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.databind.JsonNode;
import top.continew.starter.json.jackson.util.JSONUtils;
import cn.hutool.json.JSONUtil;
import top.continew.starter.log.model.AccessLogProperties;
import top.continew.starter.log.model.LogProperties;
import top.continew.starter.web.util.ServletUtils;
import top.continew.starter.web.util.SpringWebUtils;
import top.continew.starter.core.util.ServletUtils;
import top.continew.starter.core.util.SpringWebUtils;
import java.util.*;
import java.util.stream.Collectors;
@@ -79,7 +78,7 @@ public class AccessLogUtils {
params = processTruncateLongParams(params, properties.getLongParamThreshold(), properties
.getLongParamMaxLength(), properties.getLongParamSuffix());
}
return JSONUtils.toJsonStr(params);
return JSONUtil.toJsonStr(params);
}
/**
@@ -192,13 +191,12 @@ public class AccessLogUtils {
*/
private static Object getAccessLogReqParam() {
String body = ServletUtils.getRequestBody();
if (CharSequenceUtil.isNotBlank(body) && JSONUtils.isTypeJSON(body)) {
if (CharSequenceUtil.isNotBlank(body) && JSONUtil.isTypeJSON(body)) {
try {
JsonNode jsonNode = JSONUtils.getObjectMapper().readTree(body);
if (jsonNode.isArray()) {
return JSONUtils.toBean(body, List.class);
if (JSONUtil.isTypeJSONArray(body)) {
return JSONUtil.toBean(body, List.class);
} else {
return JSONUtils.toBean(body, Map.class);
return JSONUtil.toBean(body, Map.class);
}
} catch (Exception e) {
return null;

View File

@@ -20,10 +20,10 @@
</modules>
<dependencies>
<!-- Web 模块 - 核心模块 -->
<!-- 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-web-core</artifactId>
<artifactId>continew-starter-core</artifactId>
</dependency>
</dependencies>
</project>