🎉 增加aesKey生成器

This commit is contained in:
smallchill 2023-09-13 00:27:21 +08:00
parent 72b33cd4bb
commit 0ff435c76e
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,23 @@
package org.springblade.test;
import org.springblade.core.tool.utils.AesUtil;
/**
* aesKey生成器
*
* @author Chill
*/
public class AesKeyGenerator {
public static void main(String[] args) {
System.out.println("=======================================================");
for (int i = 0; i < 10; i++) {
String aesKey = AesUtil.genAesKey();
System.out.println("SpringBlade AesKey[" + aesKey + "] ");
}
System.out.println("=======================================================");
System.out.println("====== blade.token.aes-key 的值从中挑选一个便可 =========");
System.out.println("=======================================================");
}
}

View File

@ -83,7 +83,7 @@ blade:
token: token:
#使用 blade-auth服务 @org.springblade.test.SignKeyGenerator 获取 #使用 blade-auth服务 @org.springblade.test.SignKeyGenerator 获取
sign-key: 请配置32位签名提高安全性 sign-key: 请配置32位签名提高安全性
#使用AesUtil.genAesKey()生成,需和后端配置保持一致 #使用 blade-auth服务 @org.springblade.test.AesKeyGenerator 获取
aes-key: 请配置Aes的密钥 aes-key: 请配置Aes的密钥
xss: xss:
enabled: true enabled: true