diff --git a/src/main/java/top/sharehome/springbootinittemplate/config/canal/example/SimpleCanalClientExample.java b/src/main/java/top/sharehome/springbootinittemplate/config/canal/example/SimpleCanalClientExample.java index 58de9c08..0d32ca02 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/config/canal/example/SimpleCanalClientExample.java +++ b/src/main/java/top/sharehome/springbootinittemplate/config/canal/example/SimpleCanalClientExample.java @@ -15,7 +15,7 @@ * @author AntonyCheng */ public class SimpleCanalClientExample { - + public static void main(String[] args) { // 创建链接 CanalConnector connector = CanalConnectors.newSingleConnector(new InetSocketAddress(AddressUtils.getHostIp(), 11111), "example", "", ""); diff --git a/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/convert/intNum/ExcelIntegerConverter.java b/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/convert/intNum/ExcelIntegerConverter.java index 0cd4126d..2f6ff475 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/convert/intNum/ExcelIntegerConverter.java +++ b/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/convert/intNum/ExcelIntegerConverter.java @@ -9,7 +9,6 @@ import org.apache.commons.lang3.StringUtils; import java.math.BigDecimal; -import java.util.Objects; /** * EasyExcel Integer转换类 diff --git a/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/core/impl/DefaultExcelListener.java b/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/core/impl/DefaultExcelListener.java index bcd572be..366df5f3 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/core/impl/DefaultExcelListener.java +++ b/src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/core/impl/DefaultExcelListener.java @@ -65,7 +65,7 @@ public void invokeHeadMap(Map headMap, AnalysisContext context) */ @Override public void doAfterAllAnalysed(AnalysisContext context) { - log.info("所有数据解析完毕,一共{}条数据!",excelResult.getList().size()); + log.info("所有数据解析完毕,一共{}条数据!", excelResult.getList().size()); } /** diff --git a/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/EncryptConfiguration.java b/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/EncryptConfiguration.java index f9c91439..3fe70b5c 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/EncryptConfiguration.java +++ b/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/EncryptConfiguration.java @@ -1,7 +1,5 @@ package top.sharehome.springbootinittemplate.config.encrypt; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -12,6 +10,8 @@ import top.sharehome.springbootinittemplate.utils.encrypt.AESUtils; import top.sharehome.springbootinittemplate.utils.encrypt.RSAUtils; +import javax.annotation.PostConstruct; +import javax.annotation.Resource; import javax.crypto.SecretKey; import java.security.KeyPair; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/filter/RSAEncryptFilter.java b/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/filter/RSAEncryptFilter.java index 34bf31a9..de8b3f08 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/filter/RSAEncryptFilter.java +++ b/src/main/java/top/sharehome/springbootinittemplate/config/encrypt/filter/RSAEncryptFilter.java @@ -2,11 +2,6 @@ import com.alibaba.fastjson.JSON; import com.fasterxml.jackson.databind.ObjectMapper; -import javax.annotation.Resource; -import javax.servlet.*; -import javax.servlet.annotation.WebFilter; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Conditional; import org.springframework.core.annotation.AnnotationUtils; @@ -26,6 +21,11 @@ import top.sharehome.springbootinittemplate.utils.encrypt.RSAUtils; import top.sharehome.springbootinittemplate.utils.request.ParamsAndBodyRequestWrapper; +import javax.annotation.Resource; +import javax.servlet.*; +import javax.servlet.annotation.WebFilter; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.lang.annotation.Annotation; diff --git a/src/main/java/top/sharehome/springbootinittemplate/config/i18n/controller/I18nDemoController.java b/src/main/java/top/sharehome/springbootinittemplate/config/i18n/controller/I18nDemoController.java index ef00c04e..1271c6c4 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/config/i18n/controller/I18nDemoController.java +++ b/src/main/java/top/sharehome/springbootinittemplate/config/i18n/controller/I18nDemoController.java @@ -2,7 +2,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; import top.sharehome.springbootinittemplate.common.base.R; import top.sharehome.springbootinittemplate.common.base.ReturnCode; import top.sharehome.springbootinittemplate.config.i18n.I18nManager; @@ -23,7 +22,7 @@ public R welcome(@RequestParam String name) { int seed = new Random().nextInt(); if (seed % 2 == 0) { throw new CustomizeReturnException(ReturnCode.ACCOUNT_AND_EMAIL_DO_NOT_MATCH.toI18n()); - }else { + } else { return R.ok(I18nManager.getMessage("welcome", name)); } } diff --git a/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeEncryptException.java b/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeEncryptException.java index f2728fe5..3ec614df 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeEncryptException.java +++ b/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeEncryptException.java @@ -15,7 +15,7 @@ @Data @EqualsAndHashCode(callSuper = true) @Slf4j -public class CustomizeEncryptException extends CustomizeException{ +public class CustomizeEncryptException extends CustomizeException { public CustomizeEncryptException() { this.returnCode = ReturnCode.FAIL; diff --git a/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeMailException.java b/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeMailException.java index 22caf392..2f2c8671 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeMailException.java +++ b/src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeMailException.java @@ -15,7 +15,7 @@ @Data @EqualsAndHashCode(callSuper = true) @Slf4j -public class CustomizeMailException extends CustomizeException{ +public class CustomizeMailException extends CustomizeException { public CustomizeMailException() { this.returnCode = ReturnCode.FAIL; diff --git a/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/PdfUtils.java b/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/PdfUtils.java index f3da53f9..9b35de1b 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/PdfUtils.java +++ b/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/PdfUtils.java @@ -2,8 +2,6 @@ import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -35,6 +33,8 @@ import top.sharehome.springbootinittemplate.utils.document.pdf.enums.*; import javax.imageio.ImageIO; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; import java.awt.*; import java.io.*; import java.net.URLEncoder; diff --git a/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/enums/ExportDataSource.java b/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/enums/ExportDataSource.java index 003a3f46..f58f50d4 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/enums/ExportDataSource.java +++ b/src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/enums/ExportDataSource.java @@ -25,6 +25,6 @@ public enum ExportDataSource { /** * jte数据源 */ - JTE; + JTE } diff --git a/src/main/java/top/sharehome/springbootinittemplate/utils/request/ParamsAndBodyRequestWrapper.java b/src/main/java/top/sharehome/springbootinittemplate/utils/request/ParamsAndBodyRequestWrapper.java index 4b4bef9b..eac4fcfb 100644 --- a/src/main/java/top/sharehome/springbootinittemplate/utils/request/ParamsAndBodyRequestWrapper.java +++ b/src/main/java/top/sharehome/springbootinittemplate/utils/request/ParamsAndBodyRequestWrapper.java @@ -1,14 +1,14 @@ package top.sharehome.springbootinittemplate.utils.request; import com.alibaba.fastjson2.JSON; -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; import lombok.extern.slf4j.Slf4j; import top.sharehome.springbootinittemplate.common.base.ReturnCode; import top.sharehome.springbootinittemplate.exception.customize.CustomizeReturnException; +import javax.servlet.ReadListener; +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/src/test/java/top/sharehome/springbootinittemplate/MainApplicationTests.java b/src/test/java/top/sharehome/springbootinittemplate/MainApplicationTests.java index 9182fc9c..b4cc7b3c 100644 --- a/src/test/java/top/sharehome/springbootinittemplate/MainApplicationTests.java +++ b/src/test/java/top/sharehome/springbootinittemplate/MainApplicationTests.java @@ -3,7 +3,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.github.houbb.opencc4j.util.ZhConverterUtil; -import javax.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @@ -12,6 +11,7 @@ import top.sharehome.springbootinittemplate.model.entity.User; import top.sharehome.springbootinittemplate.service.AuthService; +import javax.annotation.Resource; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; diff --git a/src/test/java/top/sharehome/springbootinittemplate/document/pdf/TestPdfExport.java b/src/test/java/top/sharehome/springbootinittemplate/document/pdf/TestPdfExport.java index 3b93c96c..dd0d50db 100644 --- a/src/test/java/top/sharehome/springbootinittemplate/document/pdf/TestPdfExport.java +++ b/src/test/java/top/sharehome/springbootinittemplate/document/pdf/TestPdfExport.java @@ -27,7 +27,7 @@ public static void main(String[] args) { try ( FileOutputStream exportThymeleafStream = new FileOutputStream(EXPORT_THYMELEAF_WORD_FILE_PATH_NAME); FileOutputStream exportFreemarkerStream = new FileOutputStream(EXPORT_FREEMARKER_WORD_FILE_PATH_NAME); - FileOutputStream exportJteStream = new FileOutputStream(EXPORT_JTE_WORD_FILE_PATH_NAME); + FileOutputStream exportJteStream = new FileOutputStream(EXPORT_JTE_WORD_FILE_PATH_NAME) ) { Map freemarkerData = new HashMap<>(); List freemarkerList = new ArrayList<>(2);