简化 application.yaml 和 bootstrap.yaml 等配置文件

This commit is contained in:
YunaiV
2022-06-11 23:58:41 +08:00
parent f08fe24174
commit b1149279c0
13 changed files with 11 additions and 473 deletions

View File

@@ -16,18 +16,18 @@ public class SecurityProperties {
* HTTP 请求时,访问令牌的请求 Header
*/
@NotEmpty(message = "Token Header 不能为空")
private String tokenHeader;
private String tokenHeader = "Authorization";
/**
* mock 模式的开关
*/
@NotNull(message = "mock 模式的开关不能为空")
private Boolean mockEnable;
private Boolean mockEnable = false;
/**
* mock 模式的密钥
* 一定要配置密钥,保证安全性
*/
@NotEmpty(message = "mock 模式的密钥不能为空") // 这里设置了一个默认值,因为实际上只有 mockEnable 为 true 时才需要配置。
private String mockSecret = "yudaoyuanma";
private String mockSecret = "test";
}