Skip to content

Commit d76305c

Browse files
committed
SpringBoot初始化模板v2.1.9 发布版本。
1 parent 37b4411 commit d76305c

File tree

13 files changed

+21
-23
lines changed

13 files changed

+21
-23
lines changed

src/main/java/top/sharehome/springbootinittemplate/config/canal/example/SimpleCanalClientExample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @author AntonyCheng
1616
*/
1717
public class SimpleCanalClientExample {
18-
18+
1919
public static void main(String[] args) {
2020
// 创建链接
2121
CanalConnector connector = CanalConnectors.newSingleConnector(new InetSocketAddress(AddressUtils.getHostIp(), 11111), "example", "", "");

src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/convert/intNum/ExcelIntegerConverter.java

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import org.apache.commons.lang3.StringUtils;
1010

1111
import java.math.BigDecimal;
12-
import java.util.Objects;
1312

1413
/**
1514
* EasyExcel Integer转换类

src/main/java/top/sharehome/springbootinittemplate/config/easyexcel/core/impl/DefaultExcelListener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context)
6565
*/
6666
@Override
6767
public void doAfterAllAnalysed(AnalysisContext context) {
68-
log.info("所有数据解析完毕,一共{}条数据!",excelResult.getList().size());
68+
log.info("所有数据解析完毕,一共{}条数据!", excelResult.getList().size());
6969
}
7070

7171
/**

src/main/java/top/sharehome/springbootinittemplate/config/encrypt/EncryptConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package top.sharehome.springbootinittemplate.config.encrypt;
22

3-
import javax.annotation.PostConstruct;
4-
import javax.annotation.Resource;
53
import lombok.Getter;
64
import lombok.extern.slf4j.Slf4j;
75
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -12,6 +10,8 @@
1210
import top.sharehome.springbootinittemplate.utils.encrypt.AESUtils;
1311
import top.sharehome.springbootinittemplate.utils.encrypt.RSAUtils;
1412

13+
import javax.annotation.PostConstruct;
14+
import javax.annotation.Resource;
1515
import javax.crypto.SecretKey;
1616
import java.security.KeyPair;
1717
import java.util.concurrent.CompletableFuture;

src/main/java/top/sharehome/springbootinittemplate/config/encrypt/filter/RSAEncryptFilter.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
import com.alibaba.fastjson.JSON;
44
import com.fasterxml.jackson.databind.ObjectMapper;
5-
import javax.annotation.Resource;
6-
import javax.servlet.*;
7-
import javax.servlet.annotation.WebFilter;
8-
import javax.servlet.http.HttpServletRequest;
9-
import javax.servlet.http.HttpServletResponse;
105
import org.springframework.beans.factory.annotation.Value;
116
import org.springframework.context.annotation.Conditional;
127
import org.springframework.core.annotation.AnnotationUtils;
@@ -26,6 +21,11 @@
2621
import top.sharehome.springbootinittemplate.utils.encrypt.RSAUtils;
2722
import top.sharehome.springbootinittemplate.utils.request.ParamsAndBodyRequestWrapper;
2823

24+
import javax.annotation.Resource;
25+
import javax.servlet.*;
26+
import javax.servlet.annotation.WebFilter;
27+
import javax.servlet.http.HttpServletRequest;
28+
import javax.servlet.http.HttpServletResponse;
2929
import java.io.IOException;
3030
import java.io.PrintWriter;
3131
import java.lang.annotation.Annotation;

src/main/java/top/sharehome/springbootinittemplate/config/i18n/controller/I18nDemoController.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.springframework.web.bind.annotation.GetMapping;
44
import org.springframework.web.bind.annotation.RequestParam;
5-
import org.springframework.web.bind.annotation.RestController;
65
import top.sharehome.springbootinittemplate.common.base.R;
76
import top.sharehome.springbootinittemplate.common.base.ReturnCode;
87
import top.sharehome.springbootinittemplate.config.i18n.I18nManager;
@@ -23,7 +22,7 @@ public R<String> welcome(@RequestParam String name) {
2322
int seed = new Random().nextInt();
2423
if (seed % 2 == 0) {
2524
throw new CustomizeReturnException(ReturnCode.ACCOUNT_AND_EMAIL_DO_NOT_MATCH.toI18n());
26-
}else {
25+
} else {
2726
return R.ok(I18nManager.getMessage("welcome", name));
2827
}
2928
}

src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeEncryptException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@Data
1616
@EqualsAndHashCode(callSuper = true)
1717
@Slf4j
18-
public class CustomizeEncryptException extends CustomizeException{
18+
public class CustomizeEncryptException extends CustomizeException {
1919

2020
public CustomizeEncryptException() {
2121
this.returnCode = ReturnCode.FAIL;

src/main/java/top/sharehome/springbootinittemplate/exception/customize/CustomizeMailException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@Data
1616
@EqualsAndHashCode(callSuper = true)
1717
@Slf4j
18-
public class CustomizeMailException extends CustomizeException{
18+
public class CustomizeMailException extends CustomizeException {
1919

2020
public CustomizeMailException() {
2121
this.returnCode = ReturnCode.FAIL;

src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/PdfUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import io.netty.buffer.ByteBuf;
44
import io.netty.buffer.Unpooled;
5-
import javax.servlet.ServletOutputStream;
6-
import javax.servlet.http.HttpServletResponse;
75
import lombok.AllArgsConstructor;
86
import lombok.Data;
97
import lombok.NoArgsConstructor;
@@ -35,6 +33,8 @@
3533
import top.sharehome.springbootinittemplate.utils.document.pdf.enums.*;
3634

3735
import javax.imageio.ImageIO;
36+
import javax.servlet.ServletOutputStream;
37+
import javax.servlet.http.HttpServletResponse;
3838
import java.awt.*;
3939
import java.io.*;
4040
import java.net.URLEncoder;

src/main/java/top/sharehome/springbootinittemplate/utils/document/pdf/enums/ExportDataSource.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ public enum ExportDataSource {
2525
/**
2626
* jte数据源
2727
*/
28-
JTE;
28+
JTE
2929

3030
}

src/main/java/top/sharehome/springbootinittemplate/utils/request/ParamsAndBodyRequestWrapper.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package top.sharehome.springbootinittemplate.utils.request;
22

33
import com.alibaba.fastjson2.JSON;
4-
import javax.servlet.ReadListener;
5-
import javax.servlet.ServletInputStream;
6-
import javax.servlet.http.HttpServletRequest;
7-
import javax.servlet.http.HttpServletRequestWrapper;
84
import lombok.extern.slf4j.Slf4j;
95
import top.sharehome.springbootinittemplate.common.base.ReturnCode;
106
import top.sharehome.springbootinittemplate.exception.customize.CustomizeReturnException;
117

8+
import javax.servlet.ReadListener;
9+
import javax.servlet.ServletInputStream;
10+
import javax.servlet.http.HttpServletRequest;
11+
import javax.servlet.http.HttpServletRequestWrapper;
1212
import java.io.BufferedReader;
1313
import java.io.ByteArrayInputStream;
1414
import java.io.IOException;

src/test/java/top/sharehome/springbootinittemplate/MainApplicationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
44
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
55
import com.github.houbb.opencc4j.util.ZhConverterUtil;
6-
import javax.annotation.Resource;
76
import lombok.extern.slf4j.Slf4j;
87
import org.junit.jupiter.api.Test;
98
import org.springframework.boot.test.context.SpringBootTest;
@@ -12,6 +11,7 @@
1211
import top.sharehome.springbootinittemplate.model.entity.User;
1312
import top.sharehome.springbootinittemplate.service.AuthService;
1413

14+
import javax.annotation.Resource;
1515
import java.util.Arrays;
1616
import java.util.List;
1717
import java.util.stream.Collectors;

src/test/java/top/sharehome/springbootinittemplate/document/pdf/TestPdfExport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void main(String[] args) {
2727
try (
2828
FileOutputStream exportThymeleafStream = new FileOutputStream(EXPORT_THYMELEAF_WORD_FILE_PATH_NAME);
2929
FileOutputStream exportFreemarkerStream = new FileOutputStream(EXPORT_FREEMARKER_WORD_FILE_PATH_NAME);
30-
FileOutputStream exportJteStream = new FileOutputStream(EXPORT_JTE_WORD_FILE_PATH_NAME);
30+
FileOutputStream exportJteStream = new FileOutputStream(EXPORT_JTE_WORD_FILE_PATH_NAME)
3131
) {
3232
Map<String, Object> freemarkerData = new HashMap<>();
3333
List<String> freemarkerList = new ArrayList<>(2);

0 commit comments

Comments
 (0)