赞
踩
# spring配置
spring:
datasource:
dynamic:
datasource:
# 主库数据源
master:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/test_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: plclot_root
password: 密文
druid:
public-key: 密文
spring.datasource.url=jdbc:mysql://localhost:3306/user?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8 spring.datasource.username=root # 生成的加密后的密码(原密码 password) spring.datasource.password=pqQuEhP1PPVUPN5qmFV4gh81n06B98X1mdWpg6DnVgcAOEFFMln72AuydH55Dk1yokczHP42OzoFL99xOPvN/w== # 生成的公钥 public-key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAK2pQSm/lqbrwuDAq/aE7CwrSa7PBbqZQ/6PTeB4K7OzzFnN8pHm2ygtaSvbruFtEGElxNiAeRoZnY0SOO/sX/8CAwEAAQ== # 配置 connection-properties,启用加密,配置公钥。 spring.datasource.druid.connect-properties.config.decrypt=true spring.datasource.druid.connect-properties.config.decrypt.key=${public-key} # 启用ConfigFilter spring.datasource.druid.filter.config.enabled=true
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。