mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 20:57:23 +08:00
refactor: 移除 Lombok 私有构造注解使用
修复 Sonarqube 扫描问题
This commit is contained in:
@@ -18,9 +18,7 @@ package top.charles7c.continew.starter.web.model;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -33,7 +31,6 @@ import java.io.Serializable;
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@Schema(description = "响应信息")
|
||||
public class R<T> implements Serializable {
|
||||
|
||||
@@ -73,6 +70,9 @@ public class R<T> implements Serializable {
|
||||
@Schema(description = "时间戳", example = "1691453288")
|
||||
private long timestamp = DateUtil.currentSeconds();
|
||||
|
||||
private R() {
|
||||
}
|
||||
|
||||
private R(boolean success, int code, String msg, T data) {
|
||||
this.success = success;
|
||||
this.code = code;
|
||||
|
@@ -20,8 +20,6 @@ import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.file.FileNameUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -36,9 +34,11 @@ import java.time.LocalDateTime;
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class FileUploadUtils {
|
||||
|
||||
private FileUploadUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
|
@@ -21,8 +21,6 @@ import cn.hutool.http.useragent.UserAgent;
|
||||
import cn.hutool.http.useragent.UserAgentUtil;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
@@ -35,9 +33,11 @@ import java.util.*;
|
||||
* @author Charles7c
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class ServletUtils {
|
||||
|
||||
private ServletUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求对象
|
||||
*
|
||||
|
@@ -20,8 +20,6 @@ import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.accept.ContentNegotiationManager;
|
||||
import org.springframework.web.servlet.HandlerMapping;
|
||||
@@ -38,9 +36,11 @@ import java.util.Map;
|
||||
* @author Charles7c
|
||||
* @since 1.1.1
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class SpringWebUtils {
|
||||
|
||||
private SpringWebUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消注册静态资源映射
|
||||
*
|
||||
|
Reference in New Issue
Block a user