feat: 实现私钥加密存储功能

- 创建 CryptoUtils 加密工具类,支持 AES-256/CBC/PKCS5Padding 加密
- encryption.key 支持任意长度密钥(通过 SHA-256 哈希成 32 字节)
- 修改 AccountService,在保存时加密私钥,在使用时解密
- 修改 CopyOrderTrackingService,在使用私钥前先解密
- 更新 Account 实体注释,说明私钥已加密存储
- 添加向后兼容支持:如果私钥未加密(旧数据),直接返回明文
This commit is contained in:
WrBug
2025-12-03 06:02:26 +08:00
parent 86dc772b7d
commit 7f85274a96
6 changed files with 206 additions and 12 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ trap cleanup SIGTERM SIGINT
# 启动后端服务(以 appuser 用户运行,后台运行)
echo "启动后端服务..."
su appuser -c "cd /app && java -jar /app/app.jar --spring.profiles.active=${SPRING_PROFILES_ACTIVE:-prod}" &
java -jar /app/app.jar --spring.profiles.active=${SPRING_PROFILES_ACTIVE:-prod} &
BACKEND_PID=$!
# 等待后端服务启动