使用外部数据源数据库连接中配置如下:
[
{
"url":"jdbc:mysql://192.168.0.1:3306/xxxx?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",
"username" : "admin",
"password" :"123456",
"driverClassName" : "com.mysql.cj.jdbc.Driver",
"includes": [],
"excludes": [],
"enable" : true
}
]处于安全的需要现在把password 改为密文存储.
在服务器控制台中输入命令:
ctl -en 123456


复制出 (ENCRYPT:P9HOhqR_SJ0) 写入配置文件中
[
{
"url":"jdbc:mysql://192.168.0.1:3306/xxxx?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",
"username" : "admin",
"password" :"(ENCRYPT:P9HOhqR_SJ0)",
"driverClassName" : "com.mysql.cj.jdbc.Driver",
"includes": [],
"excludes": [],
"enable" : true
}
]这样就完成配置文件密码使用密文配置。
浙公网安备 33010602009829号