Skip to content

Commit

Permalink
SpringBoot初始化模板v2.1.9 发布版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyCheng committed Sep 2, 2024
1 parent 37b4411 commit d76305c
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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", "", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.Objects;

/**
* EasyExcel Integer转换类
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context)
*/
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
log.info("所有数据解析完毕,一共{}条数据!",excelResult.getList().size());
log.info("所有数据解析完毕,一共{}条数据!", excelResult.getList().size());
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,7 +22,7 @@ public R<String> 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));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public enum ExportDataSource {
/**
* jte数据源
*/
JTE;
JTE

}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> freemarkerData = new HashMap<>();
List<String> freemarkerList = new ArrayList<>(2);
Expand Down

0 comments on commit d76305c

Please sign in to comment.