!662 发布 5.3.1 正式版

* 🐳发布 5.3.1 正式版
* update 优化 删除无用配置
* fix 修复 excel模板导出数据被覆盖的问题
* update 优化 统一用户密码校验长度
* update mybatis-plus 3.5.10.1 => 3.5.11
* fix 修复 跨域未设置请求头问题(cloud版本不需要 vue版本需要)
This commit is contained in:
疯狂的狮子Li
2025-03-27 02:51:57 +00:00
parent 159e30c982
commit 7a9f51fc7a
13 changed files with 24 additions and 25 deletions

View File

@@ -14,7 +14,7 @@
</description>
<properties>
<revision>5.3.1-BETA2</revision>
<revision>5.3.1</revision>
</properties>
<dependencyManagement>

View File

@@ -18,14 +18,14 @@ public class PasswordLoginBody extends LoginBody {
* 用户名
*/
@NotBlank(message = "{user.username.not.blank}")
@Length(min = 2, max = 20, message = "{user.username.length.valid}")
@Length(min = 2, max = 30, message = "{user.username.length.valid}")
private String username;
/**
* 用户密码
*/
@NotBlank(message = "{user.password.not.blank}")
@Length(min = 5, max = 20, message = "{user.password.length.valid}")
@Length(min = 5, max = 30, message = "{user.password.length.valid}")
private String password;
}

View File

@@ -76,9 +76,14 @@ public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper {
String encryptPassword = EncryptUtils.encryptByRsa(encryptAes, publicKey);
// 设置响应头
// vue版本需要设置
servletResponse.addHeader("Access-Control-Expose-Headers", headerFlag);
servletResponse.setHeader("Access-Control-Allow-Origin", "*");
servletResponse.setHeader("Access-Control-Allow-Methods", "*");
servletResponse.setHeader(headerFlag, encryptPassword);
servletResponse.setCharacterEncoding(StandardCharsets.UTF_8.toString());
// 获取原始内容
String originalBody = this.getContent();
// 对内容进行加密

View File

@@ -245,9 +245,10 @@ public class ExcelUtil {
.registerWriteHandler(new DataWriteHandler(data.get(0).getClass()))
.build();
WriteSheet writeSheet = EasyExcel.writerSheet().build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
// 单表多数据导出 模板格式为 {.属性}
for (T d : data) {
excelWriter.fill(d, writeSheet);
excelWriter.fill(d, fillConfig, writeSheet);
}
excelWriter.finish();
}
@@ -320,7 +321,7 @@ public class ExcelUtil {
// 多表导出必须使用 FillWrapper
excelWriter.fill(new FillWrapper(map.getKey(), (Collection<?>) map.getValue()), fillConfig, writeSheet);
} else {
excelWriter.fill(map.getValue(), writeSheet);
excelWriter.fill(map.getValue(), fillConfig, writeSheet);
}
}
excelWriter.finish();