refactor(log): 优化包结构

This commit is contained in:
2024-12-25 20:34:45 +08:00
parent 25f499de7e
commit 7ff26c4596
16 changed files with 23 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import top.continew.starter.log.annotation.Log;
import top.continew.starter.log.dao.LogDao;
import top.continew.starter.log.handler.LogHandler;
import top.continew.starter.log.LogHandler;
import top.continew.starter.log.model.LogProperties;
import top.continew.starter.log.model.LogRecord;
import top.continew.starter.web.util.SpringWebUtils;

View File

@@ -30,8 +30,8 @@ import top.continew.starter.log.aspect.LogAspect;
import top.continew.starter.log.dao.LogDao;
import top.continew.starter.log.dao.impl.DefaultLogDaoImpl;
import top.continew.starter.log.handler.AopLogHandler;
import top.continew.starter.log.handler.LogFilter;
import top.continew.starter.log.handler.LogHandler;
import top.continew.starter.log.LogFilter;
import top.continew.starter.log.LogHandler;
import top.continew.starter.log.model.LogProperties;
/**

View File

@@ -17,6 +17,7 @@
package top.continew.starter.log.handler;
import cn.hutool.core.text.CharSequenceUtil;
import top.continew.starter.log.AbstractLogHandler;
import top.continew.starter.log.model.LogRecord;
import java.lang.reflect.Method;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.handler;
package top.continew.starter.log;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.text.CharSequenceUtil;
@@ -22,8 +22,8 @@ import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import top.continew.starter.log.annotation.Log;
import top.continew.starter.log.enums.Include;
import top.continew.starter.log.http.recordable.impl.RecordableServletHttpRequest;
import top.continew.starter.log.http.recordable.impl.RecordableServletHttpResponse;
import top.continew.starter.log.http.servlet.RecordableServletHttpRequest;
import top.continew.starter.log.http.servlet.RecordableServletHttpResponse;
import top.continew.starter.log.model.LogRecord;
import java.lang.reflect.Method;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.handler;
package top.continew.starter.log;
import cn.hutool.extra.spring.SpringUtil;
import jakarta.servlet.FilterChain;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.handler;
package top.continew.starter.log;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.http.recordable;
package top.continew.starter.log.http;
import java.net.URI;
import java.util.Map;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.http.recordable;
package top.continew.starter.log.http;
import java.util.Map;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.http.recordable.impl;
package top.continew.starter.log.http.servlet;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.StrUtil;
@@ -25,7 +25,7 @@ import org.springframework.web.util.ContentCachingRequestWrapper;
import org.springframework.web.util.UriUtils;
import org.springframework.web.util.WebUtils;
import top.continew.starter.core.constant.StringConstants;
import top.continew.starter.log.http.recordable.RecordableHttpRequest;
import top.continew.starter.log.http.RecordableHttpRequest;
import java.net.URI;
import java.net.URISyntaxException;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.log.http.recordable.impl;
package top.continew.starter.log.http.servlet;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.StrUtil;
@@ -22,7 +22,7 @@ import cn.hutool.json.JSONUtil;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.util.ContentCachingResponseWrapper;
import org.springframework.web.util.WebUtils;
import top.continew.starter.log.http.recordable.RecordableHttpResponse;
import top.continew.starter.log.http.RecordableHttpResponse;
import top.continew.starter.web.util.ServletUtils;
import java.util.Map;

View File

@@ -17,8 +17,8 @@
package top.continew.starter.log.model;
import top.continew.starter.log.enums.Include;
import top.continew.starter.log.http.recordable.RecordableHttpRequest;
import top.continew.starter.log.http.recordable.RecordableHttpResponse;
import top.continew.starter.log.http.RecordableHttpRequest;
import top.continew.starter.log.http.RecordableHttpResponse;
import java.time.Duration;
import java.time.Instant;

View File

@@ -21,7 +21,7 @@ import org.springframework.http.HttpHeaders;
import top.continew.starter.core.util.ExceptionUtils;
import top.continew.starter.core.util.IpUtils;
import top.continew.starter.log.enums.Include;
import top.continew.starter.log.http.recordable.RecordableHttpRequest;
import top.continew.starter.log.http.RecordableHttpRequest;
import top.continew.starter.web.util.ServletUtils;
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.log.http.recordable.RecordableHttpResponse;
import top.continew.starter.log.http.RecordableHttpResponse;
import java.util.Map;
import java.util.Set;

View File

@@ -30,8 +30,8 @@ import top.continew.starter.log.annotation.ConditionalOnEnabledLog;
import top.continew.starter.log.dao.LogDao;
import top.continew.starter.log.dao.impl.DefaultLogDaoImpl;
import top.continew.starter.log.handler.InterceptorLogHandler;
import top.continew.starter.log.handler.LogFilter;
import top.continew.starter.log.handler.LogHandler;
import top.continew.starter.log.LogFilter;
import top.continew.starter.log.LogHandler;
import top.continew.starter.log.interceptor.LogInterceptor;
import top.continew.starter.log.model.LogProperties;

View File

@@ -20,6 +20,7 @@ import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.text.CharSequenceUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import top.continew.starter.log.AbstractLogHandler;
import top.continew.starter.log.model.LogRecord;
import java.lang.reflect.Method;

View File

@@ -29,7 +29,7 @@ import org.springframework.web.servlet.HandlerInterceptor;
import top.continew.starter.log.annotation.Log;
import top.continew.starter.log.model.LogProperties;
import top.continew.starter.log.dao.LogDao;
import top.continew.starter.log.handler.LogHandler;
import top.continew.starter.log.LogHandler;
import top.continew.starter.log.model.LogRecord;
import java.lang.reflect.Method;