mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-10-31 10:57:15 +08:00 
			
		
		
		
	chore: 优化代码格式
This commit is contained in:
		| @@ -28,7 +28,9 @@ import jakarta.annotation.PostConstruct; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springdoc.core.configuration.SpringDocConfiguration; | ||||
| import org.springdoc.core.customizers.*; | ||||
| import org.springdoc.core.customizers.GlobalOpenApiCustomizer; | ||||
| import org.springdoc.core.customizers.OpenApiBuilderCustomizer; | ||||
| import org.springdoc.core.customizers.ServerBaseUrlCustomizer; | ||||
| import org.springdoc.core.properties.SpringDocConfigProperties; | ||||
| import org.springdoc.core.providers.JavadocProvider; | ||||
| import org.springdoc.core.service.OpenAPIService; | ||||
| @@ -48,7 +50,9 @@ import top.continew.starter.apidoc.handler.OpenApiHandler; | ||||
| import top.continew.starter.core.autoconfigure.project.ProjectProperties; | ||||
| import top.continew.starter.core.util.GeneralPropertySourceFactory; | ||||
|  | ||||
| import java.util.*; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.Optional; | ||||
| import java.util.concurrent.TimeUnit; | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -26,12 +26,12 @@ import io.swagger.v3.oas.models.parameters.Parameter; | ||||
| import org.springdoc.core.customizers.ParameterCustomizer; | ||||
| import org.springdoc.core.customizers.PropertyCustomizer; | ||||
| import org.springframework.core.MethodParameter; | ||||
| import top.continew.starter.apidoc.util.DocUtils; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| import java.lang.reflect.Type; | ||||
| import java.util.Arrays; | ||||
| import java.util.List; | ||||
| import top.continew.starter.apidoc.util.DocUtils; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| /** | ||||
|  * 自定义 BaseEnum 枚举参数处理器 | ||||
|   | ||||
| @@ -146,22 +146,26 @@ public class OpenApiHandler extends OpenAPIService { | ||||
|         super(openAPI, securityParser, springDocConfigProperties, propertyResolverUtils, openApiBuilderCustomizers, serverBaseUrlCustomizers, javadocProvider); | ||||
|         if (openAPI.isPresent()) { | ||||
|             this.openAPI = openAPI.get(); | ||||
|             if (this.openAPI.getComponents() == null) | ||||
|             if (this.openAPI.getComponents() == null) { | ||||
|                 this.openAPI.setComponents(new Components()); | ||||
|             if (this.openAPI.getPaths() == null) | ||||
|             } | ||||
|             if (this.openAPI.getPaths() == null) { | ||||
|                 this.openAPI.setPaths(new Paths()); | ||||
|             if (!CollectionUtils.isEmpty(this.openAPI.getServers())) | ||||
|             } | ||||
|             if (!CollectionUtils.isEmpty(this.openAPI.getServers())) { | ||||
|                 this.isServersPresent = true; | ||||
|             } | ||||
|         } | ||||
|         this.propertyResolverUtils = propertyResolverUtils; | ||||
|         this.securityParser = securityParser; | ||||
|         this.springDocConfigProperties = springDocConfigProperties; | ||||
|         this.openApiBuilderCustomisers = openApiBuilderCustomizers; | ||||
|         this.serverBaseUrlCustomizers = serverBaseUrlCustomizers; | ||||
|         this.javadocProvider = javadocProvider; | ||||
|         if (springDocConfigProperties.isUseFqn()) | ||||
|         if (springDocConfigProperties.isUseFqn()) { | ||||
|             TypeNameResolver.std.setUseFqn(true); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public Operation buildTags(HandlerMethod handlerMethod, Operation operation, OpenAPI openAPI, Locale locale) { | ||||
| @@ -172,10 +176,11 @@ public class OpenApiHandler extends OpenAPIService { | ||||
|         buildTagsFromMethod(handlerMethod.getMethod(), tags, tagsStr, locale); | ||||
|         buildTagsFromClass(handlerMethod.getBeanType(), tags, tagsStr, locale); | ||||
|  | ||||
|         if (!CollectionUtils.isEmpty(tagsStr)) | ||||
|         if (!CollectionUtils.isEmpty(tagsStr)) { | ||||
|             tagsStr = tagsStr.stream() | ||||
|                 .map(str -> propertyResolverUtils.resolve(str, locale)) | ||||
|                 .collect(Collectors.toSet()); | ||||
|         } | ||||
|  | ||||
|         if (springdocTags.containsKey(handlerMethod)) { | ||||
|             Tag tag = springdocTags.get(handlerMethod); | ||||
| @@ -186,9 +191,9 @@ public class OpenApiHandler extends OpenAPIService { | ||||
|         } | ||||
|  | ||||
|         if (!CollectionUtils.isEmpty(tagsStr)) { | ||||
|             if (CollectionUtils.isEmpty(operation.getTags())) | ||||
|             if (CollectionUtils.isEmpty(operation.getTags())) { | ||||
|                 operation.setTags(new ArrayList<>(tagsStr)); | ||||
|             else { | ||||
|             } else { | ||||
|                 Set<String> operationTagsSet = new HashSet<>(operation.getTags()); | ||||
|                 operationTagsSet.addAll(tagsStr); | ||||
|                 operation.getTags().clear(); | ||||
| @@ -223,8 +228,9 @@ public class OpenApiHandler extends OpenAPIService { | ||||
|         if (!CollectionUtils.isEmpty(tags)) { | ||||
|             // Existing tags | ||||
|             List<Tag> openApiTags = openAPI.getTags(); | ||||
|             if (!CollectionUtils.isEmpty(openApiTags)) | ||||
|             if (!CollectionUtils.isEmpty(openApiTags)) { | ||||
|                 tags.addAll(openApiTags); | ||||
|             } | ||||
|             openAPI.setTags(new ArrayList<>(tags)); | ||||
|         } | ||||
|  | ||||
| @@ -232,11 +238,12 @@ public class OpenApiHandler extends OpenAPIService { | ||||
|         io.swagger.v3.oas.annotations.security.SecurityRequirement[] securityRequirements = securityParser | ||||
|             .getSecurityRequirements(handlerMethod); | ||||
|         if (securityRequirements != null) { | ||||
|             if (securityRequirements.length == 0) | ||||
|             if (securityRequirements.length == 0) { | ||||
|                 operation.setSecurity(Collections.emptyList()); | ||||
|             else | ||||
|             } else { | ||||
|                 securityParser.buildSecurityRequirement(securityRequirements, operation); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return operation; | ||||
|     } | ||||
| @@ -263,8 +270,9 @@ public class OpenApiHandler extends OpenAPIService { | ||||
|             tagsSet.forEach(tag -> { | ||||
|                 tag.name(propertyResolverUtils.resolve(tag.getName(), locale)); | ||||
|                 tag.description(propertyResolverUtils.resolve(tag.getDescription(), locale)); | ||||
|                 if (tags.stream().noneMatch(t -> t.getName().equals(tag.getName()))) | ||||
|                 if (tags.stream().noneMatch(t -> t.getName().equals(tag.getName()))) { | ||||
|                     tags.add(tag); | ||||
|                 } | ||||
|             }); | ||||
|         }); | ||||
|     } | ||||
|   | ||||
| @@ -16,14 +16,15 @@ | ||||
|  | ||||
| package top.continew.starter.apidoc.util; | ||||
|  | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| import java.lang.reflect.ParameterizedType; | ||||
| import java.lang.reflect.Type; | ||||
| import java.util.Arrays; | ||||
| import java.util.LinkedHashMap; | ||||
| import java.util.Map; | ||||
| import java.util.stream.Collectors; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| /** | ||||
|  * 接口文档工具类 | ||||
|   | ||||
| @@ -29,7 +29,10 @@ import org.springframework.boot.autoconfigure.AutoConfiguration; | ||||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||||
| import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||||
| import org.springframework.context.annotation.*; | ||||
| import org.springframework.context.annotation.Bean; | ||||
| import org.springframework.context.annotation.Configuration; | ||||
| import org.springframework.context.annotation.Import; | ||||
| import org.springframework.context.annotation.PropertySource; | ||||
| import org.springframework.web.servlet.config.annotation.InterceptorRegistry; | ||||
| import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||||
| import top.continew.starter.auth.satoken.autoconfigure.dao.SaTokenDaoConfiguration; | ||||
| @@ -78,8 +81,7 @@ public class SaTokenAutoConfiguration implements WebMvcConfigurer { | ||||
|     @Configuration | ||||
|     @Import({SaTokenDaoConfiguration.Default.class, SaTokenDaoConfiguration.Redis.class, | ||||
|         SaTokenDaoConfiguration.Custom.class}) | ||||
|     protected static class SaTokenDaoAutoConfiguration { | ||||
|     } | ||||
|     protected static class SaTokenDaoAutoConfiguration {} | ||||
|  | ||||
|     /** | ||||
|      * 整合 JWT(简单模式) | ||||
|   | ||||
| @@ -16,8 +16,8 @@ | ||||
|  | ||||
| package top.continew.starter.captcha.graphic.core; | ||||
|  | ||||
| import cn.hutool.core.util.ReflectUtil; | ||||
| import cn.hutool.core.text.CharSequenceUtil; | ||||
| import cn.hutool.core.util.ReflectUtil; | ||||
| import com.wf.captcha.base.Captcha; | ||||
| import top.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaProperties; | ||||
|  | ||||
|   | ||||
| @@ -31,5 +31,4 @@ import org.springframework.context.annotation.Import; | ||||
| @ComponentScan("cn.hutool.extra.spring") | ||||
| @Import(cn.hutool.extra.spring.SpringUtil.class) | ||||
| @EnableConfigurationProperties(ProjectProperties.class) | ||||
| public class ProjectAutoConfiguration { | ||||
| } | ||||
| public class ProjectAutoConfiguration {} | ||||
|   | ||||
| @@ -120,8 +120,7 @@ public class StringConstants { | ||||
|     public static final String DOT = StrPool.DOT; | ||||
|  | ||||
|     /** | ||||
|      * 字符串常量:双点 {@code ".."} <br> | ||||
|      * 用途:作为指向上级文件夹的路径,如:{@code "../path"} | ||||
|      * 字符串常量:双点 {@code ".."} <br> 用途:作为指向上级文件夹的路径,如:{@code "../path"} | ||||
|      */ | ||||
|     public static final String DOUBLE_DOT = StrPool.DOUBLE_DOT; | ||||
|  | ||||
| @@ -136,8 +135,7 @@ public class StringConstants { | ||||
|     public static final String BACKSLASH = StrPool.BACKSLASH; | ||||
|  | ||||
|     /** | ||||
|      * 字符串常量:回车符 {@code "\r"} <br> | ||||
|      * 解释:该字符常用于表示 Linux 系统和 MacOS 系统下的文本换行 | ||||
|      * 字符串常量:回车符 {@code "\r"} <br> 解释:该字符常用于表示 Linux 系统和 MacOS 系统下的文本换行 | ||||
|      */ | ||||
|     public static final String CR = StrPool.CR; | ||||
|  | ||||
| @@ -147,8 +145,7 @@ public class StringConstants { | ||||
|     public static final String LF = StrPool.LF; | ||||
|  | ||||
|     /** | ||||
|      * 字符串常量:Windows 换行 {@code "\r\n"} <br> | ||||
|      * 解释:该字符串常用于表示 Windows 系统下的文本换行 | ||||
|      * 字符串常量:Windows 换行 {@code "\r\n"} <br> 解释:该字符串常用于表示 Windows 系统下的文本换行 | ||||
|      */ | ||||
|     public static final String CRLF = StrPool.CRLF; | ||||
|  | ||||
|   | ||||
| @@ -23,5 +23,4 @@ package top.continew.starter.data.mf.service; | ||||
|  * @author hellokaton | ||||
|  * @since 1.2.0 | ||||
|  */ | ||||
| public interface IService<T> extends com.mybatisflex.core.service.IService<T> { | ||||
| } | ||||
| public interface IService<T> extends com.mybatisflex.core.service.IService<T> {} | ||||
|   | ||||
| @@ -30,7 +30,9 @@ import net.sf.jsqlparser.expression.operators.relational.ExpressionList; | ||||
| import net.sf.jsqlparser.expression.operators.relational.InExpression; | ||||
| import net.sf.jsqlparser.schema.Column; | ||||
| import net.sf.jsqlparser.schema.Table; | ||||
| import net.sf.jsqlparser.statement.select.*; | ||||
| import net.sf.jsqlparser.statement.select.ParenthesedSelect; | ||||
| import net.sf.jsqlparser.statement.select.PlainSelect; | ||||
| import net.sf.jsqlparser.statement.select.SelectItem; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import top.continew.starter.core.constant.StringConstants; | ||||
|   | ||||
| @@ -23,5 +23,4 @@ package top.continew.starter.data.mp.service; | ||||
|  * @author Charles7c | ||||
|  * @since 1.2.0 | ||||
|  */ | ||||
| public interface IService<T> extends com.baomidou.mybatisplus.extension.service.IService<T> { | ||||
| } | ||||
| public interface IService<T> extends com.baomidou.mybatisplus.extension.service.IService<T> {} | ||||
|   | ||||
| @@ -16,13 +16,13 @@ | ||||
|  | ||||
| package top.continew.starter.data.mp.util; | ||||
|  | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import cn.hutool.core.collection.CollUtil; | ||||
| import cn.hutool.core.text.CharSequenceUtil; | ||||
| import cn.hutool.core.util.ArrayUtil; | ||||
| import cn.hutool.core.util.ObjectUtil; | ||||
| import cn.hutool.core.text.CharSequenceUtil; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springframework.data.domain.Sort; | ||||
| import top.continew.starter.core.exception.BadRequestException; | ||||
| import top.continew.starter.core.util.ReflectUtils; | ||||
| @@ -33,7 +33,10 @@ import top.continew.starter.data.core.enums.QueryType; | ||||
| import top.continew.starter.data.core.util.SqlInjectionUtils; | ||||
|  | ||||
| import java.lang.reflect.Field; | ||||
| import java.util.*; | ||||
| import java.util.ArrayList; | ||||
| import java.util.Collection; | ||||
| import java.util.Collections; | ||||
| import java.util.List; | ||||
| import java.util.function.Consumer; | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -31,5 +31,4 @@ import java.lang.annotation.*; | ||||
| @Retention(RetentionPolicy.RUNTIME) | ||||
| @Documented | ||||
| @Import({CrudRestControllerAutoConfiguration.class}) | ||||
| public @interface EnableCrudRestController { | ||||
| } | ||||
| public @interface EnableCrudRestController {} | ||||
|   | ||||
| @@ -33,13 +33,11 @@ public interface ValidateGroup extends Default { | ||||
|         /** | ||||
|          * 分组校验-创建 | ||||
|          */ | ||||
|         interface Add extends Crud { | ||||
|         } | ||||
|         interface Add extends Crud {} | ||||
|  | ||||
|         /** | ||||
|          * 分组校验-修改 | ||||
|          */ | ||||
|         interface Update extends Crud { | ||||
|         } | ||||
|         interface Update extends Crud {} | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.continew.starter.extension.crud.service; | ||||
|  | ||||
| import cn.hutool.core.lang.tree.Tree; | ||||
| import jakarta.servlet.http.HttpServletResponse; | ||||
| import top.continew.starter.extension.crud.model.query.SortQuery; | ||||
| import top.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.continew.starter.extension.crud.model.query.SortQuery; | ||||
| import top.continew.starter.extension.crud.model.resp.LabelValueResp; | ||||
| import top.continew.starter.extension.crud.model.resp.PageResp; | ||||
|  | ||||
|   | ||||
| @@ -34,15 +34,15 @@ import top.continew.starter.core.constant.StringConstants; | ||||
| import top.continew.starter.core.util.ReflectUtils; | ||||
| import top.continew.starter.core.util.validate.ValidationUtils; | ||||
| import top.continew.starter.data.mf.base.BaseMapper; | ||||
| import top.continew.starter.data.mf.util.QueryWrapperHelper; | ||||
| import top.continew.starter.data.mf.service.impl.ServiceImpl; | ||||
| import top.continew.starter.data.mf.util.QueryWrapperHelper; | ||||
| import top.continew.starter.extension.crud.annotation.TreeField; | ||||
| import top.continew.starter.extension.crud.model.entity.BaseIdDO; | ||||
| import top.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.continew.starter.extension.crud.model.query.SortQuery; | ||||
| import top.continew.starter.extension.crud.model.resp.PageResp; | ||||
| import top.continew.starter.extension.crud.service.BaseService; | ||||
| import top.continew.starter.extension.crud.util.TreeUtils; | ||||
| import top.continew.starter.extension.crud.model.entity.BaseIdDO; | ||||
| import top.continew.starter.file.excel.util.ExcelUtils; | ||||
|  | ||||
| import java.lang.reflect.Field; | ||||
|   | ||||
| @@ -30,13 +30,13 @@ import org.springframework.web.bind.annotation.*; | ||||
| import top.continew.starter.core.constant.StringConstants; | ||||
| import top.continew.starter.extension.crud.annotation.CrudRequestMapping; | ||||
| import top.continew.starter.extension.crud.enums.Api; | ||||
| import top.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.continew.starter.extension.crud.model.query.SortQuery; | ||||
| import top.continew.starter.extension.crud.model.req.BaseReq; | ||||
| import top.continew.starter.extension.crud.model.resp.BaseIdResp; | ||||
| import top.continew.starter.extension.crud.util.ValidateGroup; | ||||
| import top.continew.starter.extension.crud.model.query.PageQuery; | ||||
| import top.continew.starter.extension.crud.model.resp.PageResp; | ||||
| import top.continew.starter.extension.crud.service.BaseService; | ||||
| import top.continew.starter.extension.crud.util.ValidateGroup; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
|   | ||||
| @@ -30,8 +30,8 @@ import top.continew.starter.core.enums.BaseEnum; | ||||
| /** | ||||
|  * Easy Excel 枚举接口转换器 | ||||
|  * | ||||
|  * @see BaseEnum | ||||
|  * @author Charles7c | ||||
|  * @see BaseEnum | ||||
|  * @since 1.2.0 | ||||
|  */ | ||||
| public class ExcelBaseEnumConverter implements Converter<BaseEnum<Integer>> { | ||||
|   | ||||
| @@ -18,7 +18,8 @@ package top.continew.starter.log.core.model; | ||||
|  | ||||
| import top.continew.starter.log.core.enums.Include; | ||||
|  | ||||
| import java.util.*; | ||||
| import java.util.Map; | ||||
| import java.util.Set; | ||||
|  | ||||
| /** | ||||
|  * 响应信息 | ||||
|   | ||||
| @@ -30,7 +30,8 @@ import top.continew.starter.log.core.model.RecordableHttpRequest; | ||||
| import java.net.URI; | ||||
| import java.net.URISyntaxException; | ||||
| import java.nio.charset.StandardCharsets; | ||||
| import java.util.*; | ||||
| import java.util.Collections; | ||||
| import java.util.Map; | ||||
|  | ||||
| /** | ||||
|  * 可记录的 HTTP 请求信息适配器 | ||||
|   | ||||
| @@ -25,7 +25,7 @@ import org.springframework.web.util.WebUtils; | ||||
| import top.continew.starter.log.core.model.RecordableHttpResponse; | ||||
| import top.continew.starter.web.util.ServletUtils; | ||||
|  | ||||
| import java.util.*; | ||||
| import java.util.Map; | ||||
|  | ||||
| /** | ||||
|  * 可记录的 HTTP 响应信息适配器 | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties; | ||||
| import top.continew.starter.core.constant.PropertiesConstants; | ||||
| import top.continew.starter.core.constant.StringConstants; | ||||
|  | ||||
| import java.awt.*; | ||||
| import java.util.ArrayList; | ||||
| import java.util.Collections; | ||||
| import java.util.List; | ||||
|   | ||||
| @@ -19,7 +19,10 @@ package top.continew.starter.security.crypto.core; | ||||
| import cn.hutool.core.util.ObjectUtil; | ||||
| import cn.hutool.core.util.ReflectUtil; | ||||
| import org.apache.ibatis.executor.resultset.ResultSetHandler; | ||||
| import org.apache.ibatis.plugin.*; | ||||
| import org.apache.ibatis.plugin.Interceptor; | ||||
| import org.apache.ibatis.plugin.Intercepts; | ||||
| import org.apache.ibatis.plugin.Invocation; | ||||
| import org.apache.ibatis.plugin.Signature; | ||||
| import org.apache.ibatis.type.SimpleTypeRegistry; | ||||
| import top.continew.starter.security.crypto.annotation.FieldEncrypt; | ||||
| import top.continew.starter.security.crypto.autoconfigure.CryptoProperties; | ||||
|   | ||||
| @@ -35,7 +35,10 @@ import top.continew.starter.security.crypto.autoconfigure.CryptoProperties; | ||||
| import top.continew.starter.security.crypto.encryptor.IEncryptor; | ||||
|  | ||||
| import java.lang.reflect.Field; | ||||
| import java.util.*; | ||||
| import java.util.Arrays; | ||||
| import java.util.HashMap; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.regex.Matcher; | ||||
| import java.util.regex.Pattern; | ||||
|  | ||||
| @@ -134,10 +137,10 @@ public class MyBatisEncryptInterceptor extends AbstractMyBatisInterceptor implem | ||||
|      * | ||||
|      * @param parameter       Wrapper 参数 | ||||
|      * @param mappedStatement 映射语句 | ||||
|      * @since 2.1.1 | ||||
|      * @author cary | ||||
|      * @author wangshaopeng@talkweb.com.cn(<a | ||||
|      *         href="https://blog.csdn.net/tianmaxingkonger/article/details/130986784">基于Mybatis-Plus拦截器实现MySQL数据加解密</a>) | ||||
|      * @since 2.1.1 | ||||
|      */ | ||||
|     private void encryptUpdateWrapper(Object parameter, MappedStatement mappedStatement) { | ||||
|         if (parameter instanceof AbstractWrapper updateWrapper) { | ||||
|   | ||||
| @@ -28,7 +28,9 @@ import org.springframework.context.annotation.Bean; | ||||
| import org.springframework.security.crypto.argon2.Argon2PasswordEncoder; | ||||
| import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | ||||
| import org.springframework.security.crypto.factory.PasswordEncoderFactories; | ||||
| import org.springframework.security.crypto.password.*; | ||||
| import org.springframework.security.crypto.password.DelegatingPasswordEncoder; | ||||
| import org.springframework.security.crypto.password.PasswordEncoder; | ||||
| import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder; | ||||
| import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder; | ||||
| import top.continew.starter.core.constant.PropertiesConstants; | ||||
| import top.continew.starter.core.util.validate.CheckUtils; | ||||
|   | ||||
| @@ -32,5 +32,4 @@ import java.lang.annotation.*; | ||||
| @Documented | ||||
| @Inherited | ||||
| @Import({GlobalResponseAutoConfiguration.class}) | ||||
| public @interface EnableGlobalResponse { | ||||
| } | ||||
| public @interface EnableGlobalResponse {} | ||||
|   | ||||
| @@ -27,5 +27,4 @@ import top.continew.starter.core.constant.PropertiesConstants; | ||||
|  * @since 2.5.0 | ||||
|  */ | ||||
| @ConfigurationProperties(PropertiesConstants.WEB_RESPONSE) | ||||
| public class GlobalResponseProperties extends GracefulResponseProperties { | ||||
| } | ||||
| public class GlobalResponseProperties extends GracefulResponseProperties {} | ||||
|   | ||||
| @@ -23,9 +23,9 @@ package top.continew.starter.web.autoconfigure.trace; | ||||
|  * 重写 TLog 配置以适配 Spring Boot 3.x | ||||
|  * </p> | ||||
|  * | ||||
|  * @see com.yomahub.tlog.springboot.property.TLogProperty | ||||
|  * @author Bryan.Zhang | ||||
|  * @author Jasmine | ||||
|  * @see com.yomahub.tlog.springboot.property.TLogProperty | ||||
|  * @since 1.3.0 | ||||
|  */ | ||||
| public class TLogProperties { | ||||
|   | ||||
| @@ -31,9 +31,9 @@ import java.io.IOException; | ||||
|  * 重写 TLog 配置以适配 Spring Boot 3.x | ||||
|  * </p> | ||||
|  * | ||||
|  * @see com.yomahub.tlog.web.filter.TLogServletFilter | ||||
|  * @author Bryan.Zhang | ||||
|  * @author Jasmine | ||||
|  * @see com.yomahub.tlog.web.filter.TLogServletFilter | ||||
|  * @since 1.3.0 | ||||
|  */ | ||||
| public class TLogServletFilter implements Filter { | ||||
|   | ||||
| @@ -28,9 +28,9 @@ import jakarta.servlet.http.HttpServletRequest; | ||||
|  * 重写 TLog 配置以适配 Spring Boot 3.x | ||||
|  * </p> | ||||
|  * | ||||
|  * @see com.yomahub.tlog.web.common.TLogWebCommon | ||||
|  * @author Bryan.Zhang | ||||
|  * @author Jasmine | ||||
|  * @see com.yomahub.tlog.web.common.TLogWebCommon | ||||
|  * @since 1.3.0 | ||||
|  */ | ||||
| public class TLogWebCommon extends TLogRPCHandler { | ||||
|   | ||||
| @@ -19,7 +19,9 @@ package top.continew.starter.web.autoconfigure.xss; | ||||
| import cn.hutool.core.collection.CollectionUtil; | ||||
| import cn.hutool.core.io.IoUtil; | ||||
| import cn.hutool.core.text.CharSequenceUtil; | ||||
| import cn.hutool.core.util.*; | ||||
| import cn.hutool.core.util.ArrayUtil; | ||||
| import cn.hutool.core.util.EscapeUtil; | ||||
| import cn.hutool.core.util.ReUtil; | ||||
| import cn.hutool.http.HtmlUtil; | ||||
| import cn.hutool.http.Method; | ||||
| import jakarta.servlet.ReadListener; | ||||
|   | ||||
| @@ -29,7 +29,10 @@ import org.springframework.http.HttpHeaders; | ||||
| import org.springframework.http.MediaType; | ||||
| import org.springframework.web.multipart.MultipartFile; | ||||
|  | ||||
| import java.io.*; | ||||
| import java.io.File; | ||||
| import java.io.FileInputStream; | ||||
| import java.io.IOException; | ||||
| import java.io.InputStream; | ||||
| import java.nio.charset.StandardCharsets; | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
|   | ||||
| @@ -23,7 +23,8 @@ import jakarta.servlet.http.HttpServletRequest; | ||||
| import jakarta.servlet.http.HttpServletResponse; | ||||
| import top.continew.starter.core.constant.StringConstants; | ||||
|  | ||||
| import java.util.*; | ||||
| import java.util.Collection; | ||||
| import java.util.Map; | ||||
|  | ||||
| /** | ||||
|  * Servlet 工具类 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user