其实已经自带了解密 `com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty` ``` java private String decrypt(String cipherText) { if (StringUtils.hasText(cipherText)) { Matcher matcher = ENC_PATTERN.matcher(cipherText); if (matcher.find()) { try { return CryptoUtils.decrypt(this.publicKey, matcher.group(1)); } catch (Exception var4) { log.error("DynamicDataSourceProperties.decrypt error ", var4); } } } return cipherText; } ``` 检测到 `ENC(xxx)`格式后回解密 配置文件上只需要 ``` yml spring.datasource.dynamic.datasource.gesoft_pcp.password=ENC(xxxxx) spring.datasource.dynamic.datasource.gesoft_pcp.public-key=xxxxxx ``` 然后,就没有然后了