From b15d84ca4ec944b8b05e964f4347fc68eca7f57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cv=5Fkkhuang=E2=80=9D?= <“420895376@qq.com”> Date: Wed, 30 Oct 2024 11:28:16 +0800 Subject: [PATCH] Code optimization --- .../configuration/restful/api/ConfigurationRestfulApi.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linkis-public-enhancements/linkis-configuration/src/main/java/org/apache/linkis/configuration/restful/api/ConfigurationRestfulApi.java b/linkis-public-enhancements/linkis-configuration/src/main/java/org/apache/linkis/configuration/restful/api/ConfigurationRestfulApi.java index e4cb9cdbb2..c9c1840739 100644 --- a/linkis-public-enhancements/linkis-configuration/src/main/java/org/apache/linkis/configuration/restful/api/ConfigurationRestfulApi.java +++ b/linkis-public-enhancements/linkis-configuration/src/main/java/org/apache/linkis/configuration/restful/api/ConfigurationRestfulApi.java @@ -311,12 +311,14 @@ public Message saveFullTree(HttpServletRequest req, @RequestBody JsonNode json) configKeyValue.setConfigValue(sparkConf); } if (AESUtils.LINKIS_DATASOURCE_AES_SWITCH.getValue() - && configKeyValue.getKey().equals("linkis.nebula.password") + && (configKeyValue.getKey().equals("linkis.nebula.password") + || configKeyValue.getKey().equals("wds.linkis.jdbc.password")) && StringUtils.isNotBlank(configKeyValue.getConfigValue())) { List configByLabelIds = configurationService.getConfigByLabelId(configKeyValue.getConfigLabelId(), null); for (ConfigKeyValue configByLabelId : configByLabelIds) { - if (configByLabelId.getKey().equals("linkis.nebula.password") + if ((configByLabelId.getKey().equals("linkis.nebula.password") + || configByLabelId.getKey().equals("wds.linkis.jdbc.password")) && !configByLabelId.getConfigValue().equals(configKeyValue.getConfigValue())) { configKeyValue.setConfigValue( AESUtils.encrypt(