标签:密钥 公钥 inline ring png 数据库密码 执行 one atl
2、cmd执行命令:cd到jar包目录下
3、执行命令:java -cp druid-1.1.17.jar com.alibaba.druid.filter.config.ConfigTools 123456,得到密钥
4、在application.properties中配置:
spring.datasource.password=idOgPR4XQBOdVM59bDupheVnkjsL1ZTr6JJ0KC+KlnJh2SFWkYsdq2MuyHdsBaskN5014w5Wmjm65ZHg2LIPQw==
spring.datasource.publicKey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANBvCbHmADoJKn9XsiPGnXWQatLxJXXAsgr1zQtaeE36/uVhacG1DbOb1TRCe+tfdHVlv/NfnWv5kADEGItRW5sCAwEAAQ==
# 启用加密,配置公钥。
spring.datasource.druid.connection-properties=config.decrypt=true;config.decrypt.key=${spring.datasource.publicKey}
# 启用ConfigFilter
spring.datasource.druid.filter.config.enabled=true
标签:密钥 公钥 inline ring png 数据库密码 执行 one atl
原文地址:https://www.cnblogs.com/lived/p/11823642.html