增加构建通知
This commit is contained in:
parent
0128d7b03b
commit
7a3bfac44e
@ -221,15 +221,13 @@ public class ExternalSystemServiceImpl extends BaseServiceImpl<ExternalSystem, E
|
||||
throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_DISABLED);
|
||||
}
|
||||
|
||||
// 解密密码和Token用于连接测试
|
||||
ExternalSystem decryptedSystem = decryptSystemForUse(system);
|
||||
|
||||
IExternalSystemIntegration integration = integrationMap.get(system.getType());
|
||||
if (integration == null) {
|
||||
throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_TYPE_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
boolean success = integration.testConnection(decryptedSystem);
|
||||
// 直接传入原始系统对象,Integration层会自动处理解密和缓存
|
||||
boolean success = integration.testConnection(system);
|
||||
if (success) {
|
||||
system.setLastConnectTime(LocalDateTime.now());
|
||||
externalSystemRepository.save(system);
|
||||
@ -362,8 +360,13 @@ public class ExternalSystemServiceImpl extends BaseServiceImpl<ExternalSystem, E
|
||||
/**
|
||||
* 解密系统信息用于实际调用外部系统
|
||||
* 创建一个临时对象,不影响原对象
|
||||
*
|
||||
* @deprecated 不再使用此方法,解密职责已移至Integration层统一处理
|
||||
* 保留此方法仅用于兼容性,实际上不应再调用
|
||||
*/
|
||||
@Deprecated
|
||||
private ExternalSystem decryptSystemForUse(ExternalSystem system) {
|
||||
log.warn("decryptSystemForUse方法已废弃,请直接使用Integration层的解密机制");
|
||||
ExternalSystem decrypted = new ExternalSystem();
|
||||
// 复制所有属性
|
||||
decrypted.setId(system.getId());
|
||||
|
||||
@ -107,7 +107,7 @@ deploy:
|
||||
encryption:
|
||||
# 加密密钥(强烈建议使用环境变量 ENCRYPTION_SECRET_KEY)
|
||||
# 生产环境务必修改为强随机字符串,密钥长度至少32位
|
||||
secret-key: ${ENCRYPTION_SECRET_KEY:CHANGE-THIS-IN-PRODUCTION-ENV-32CHARS}
|
||||
secret-key: ${ENCRYPTION_SECRET_KEY:deploy-ease-platform-secret-key-2025}
|
||||
# 加密盐值(强烈建议使用环境变量 ENCRYPTION_SALT)
|
||||
# 盐值必须是16位十六进制字符串(只能包含0-9和a-f)
|
||||
salt: ${ENCRYPTION_SALT:0123456789abcdef}
|
||||
salt: ${ENCRYPTION_SALT:a1b2c3d4e5f6a7b8}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user