Compare commits
No commits in common. "3b9c58f4d94a5f524fe77917af58f9fdf78f26e9" and "3ba55d4389c12f4aa2ed24e53275f8efc875d6e6" have entirely different histories.
3b9c58f4d9
...
3ba55d4389
@ -6,8 +6,7 @@ VITE_APP_BASE_API=/dev-api
|
|||||||
# watermark
|
# watermark
|
||||||
VITE_WATERMARK=Y
|
VITE_WATERMARK=Y
|
||||||
# 是否开启 SSE 功能
|
# 是否开启 SSE 功能
|
||||||
#VITE_APP_SSE=Y
|
VITE_APP_SSE=Y
|
||||||
VITE_APP_SSE=N
|
|
||||||
# 是否开启 websocket 功能
|
# 是否开启 websocket 功能
|
||||||
VITE_APP_WEBSOCKET=N
|
VITE_APP_WEBSOCKET=N
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 170 KiB |
Before Width: | Height: | Size: 170 KiB |
@ -1,7 +1,5 @@
|
|||||||
package org.dromara;
|
package org.dromara;
|
||||||
|
|
||||||
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
|
||||||
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||||
@ -20,32 +18,6 @@ public class DromaraApplication {
|
|||||||
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||||
application.run(args);
|
application.run(args);
|
||||||
System.out.println("mps started successfully!");
|
System.out.println("mps started successfully!");
|
||||||
TEST();
|
|
||||||
}
|
|
||||||
|
|
||||||
//方便测试,后续删掉
|
|
||||||
public static void TEST() {
|
|
||||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
|
||||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
|
||||||
|
|
||||||
// 设置加密密钥(与配置中使用的密钥一致)
|
|
||||||
config.setPassword("66668888"); // 替换为你的密钥
|
|
||||||
// 设置算法
|
|
||||||
config.setAlgorithm("PBEWithHMACSHA512AndAES_256");
|
|
||||||
config.setKeyObtentionIterations("1000");
|
|
||||||
config.setPoolSize("1");
|
|
||||||
config.setProviderName("SunJCE");
|
|
||||||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
|
||||||
config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
|
||||||
config.setStringOutputType("base64");
|
|
||||||
encryptor.setConfig(config);
|
|
||||||
|
|
||||||
String plainText = "GTsoft+123."; // 替换为你的数据库明文密码
|
|
||||||
String encryptedText = encryptor.encrypt(plainText);
|
|
||||||
System.out.println("Encrypted password: ENC(" + encryptedText + ")");
|
|
||||||
|
|
||||||
// 如需解密验证,可使用下面一行
|
|
||||||
// System.out.println("Decrypted: " + encryptor.decrypt(encryptedText));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,7 @@ spring:
|
|||||||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
dynamic:
|
dynamic:
|
||||||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||||
# 投产初期,暂时打开
|
p6spy: false
|
||||||
p6spy: true
|
|
||||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||||
primary: master
|
primary: master
|
||||||
# 严格模式 匹配不到数据源则报错
|
# 严格模式 匹配不到数据源则报错
|
||||||
|