添加jasypt加密配置
Sync All Branches to GitHub / sync (push) Successful in 3s

This commit is contained in:
hanfuye
2026-01-17 15:06:32 +08:00
parent afcf469488
commit 1c6a5dc3be
6 changed files with 69 additions and 23 deletions
@@ -1,5 +1,7 @@
package top.crushtj.xiaoyishu.auth.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -22,6 +24,7 @@ import java.time.LocalDateTime;
* @date 2025/11/21
*/
@Slf4j
@RestController
public class TestController {
@@ -7,8 +7,8 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
# 数据库连接信息
url: jdbc:mysql://127.0.0.1:3306/xiaoyishu?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: ayi
password: Os0TpcErSh26nT4Nqqjgo2vwi3IaEglzj+brT2b7q0P4Dlhnv3OEQVUNpG/dYqvJZUCR2/IyfxQ4LnQIB7FcfQ==
username: ENC(q6eB0z65vHf2Fsm/DGFZpOea+GFigZNdnInAw2YvW1vMLWGAANwp+AcGiZB8lT5c)
password: ENC(ZUUg0fBx9YSK4c4hOtIpkBpNSXMbhsRCM0CBRYHYvSzJCXTu9dK4gMgODcKgyooo67Osmm2ccgBeHbJheSMTCQ==)
druid: # Druid 连接池
initial-size: 5 # 初始化连接池大小
min-idle: 5 # 最小连接池数量
@@ -40,7 +40,6 @@ spring:
wall: # 防火墙
config:
multi-statement-allow: true
connection-properties: config.decrypt=true;config.decrypt.key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAK6C4nQHNuYSebx/5vOdvDqP/o8AH+p73s1LWCFs915RiwVHvtEd+ropmXkCO3Agc9Zuo8pyMvccIgPL9F0I8YkCAwEAAQ==
data:
redis:
database: 0 # Redis 数据库索引(默认为 0)
@@ -73,6 +72,14 @@ logging:
level:
top.crushtj.xiaoyishu.auth.domain.mappers: debug
aliyun: # 接入阿里云(发送短信使用)
accessKeyId:
accessKeySecret:
aliyun:
accessKeyId: ENC(h8yRFpNaFNA3NduXrnm8Z4D1jZr1UNapbYVdBxaSKsZMSn1RqJQ29RmqsZscxsea5vKuLdywVE+CYP3+Q+ZQ/A==)
accessKeySecret: ENC(/Ovw0XK2/fFIGXKxOdmdUHvFPI0pNSHBDkLyjAXdbQytlCCNnBW8hFBseN4t4juumjJ5AJ9KBgvgDYCV+/gWGg==)
jasypt:
encryptor:
password:
algorithm: PBEWithHMACSHA512AndAES_256
key-obtention-iterations: 1000
string-output-type: base64
provider-name: SunJCE
iv-generator-classname: org.jasypt.iv.RandomIvGenerator