Skip to content

Commit

Permalink
配置文件数据库密码兼容明文
Browse files Browse the repository at this point in the history
  • Loading branch information
elevenqq committed Feb 13, 2019
1 parent 13b7cba commit 4ff5f2b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ public void load(Properties props, InputStream is) throws IOException {
properties.load(is);

if (properties.get(PASSWORD_KEY) != null) {
String password = DbConfigEncryption.decrypt(properties.getProperty(PASSWORD_KEY));
String password;
try {
password = DbConfigEncryption.decrypt(properties.getProperty(PASSWORD_KEY));
} catch (Exception e) {
password = properties.getProperty(PASSWORD_KEY);
}
properties.setProperty(PASSWORD_KEY, password);
}
OutputStream outputStream = null;
Expand Down

0 comments on commit 4ff5f2b

Please sign in to comment.