diff --git a/parent/center.manager/src/main/resources/dev/jdbc.properties b/parent/center.manager/src/main/resources/dev/jdbc.properties index beee4ae..bdd9c83 100644 --- a/parent/center.manager/src/main/resources/dev/jdbc.properties +++ b/parent/center.manager/src/main/resources/dev/jdbc.properties @@ -1,7 +1,7 @@ # Datasource Configurations jdbc.url=jdbc:mysql://119.90.57.26:3306/center?autoReconnect=true&useUnicode=true&characterEncoding=utf-8 jdbc.username=center -jdbc.password=lyms2015 +jdbc.password=p6CBLGB3pp7LZCJXI2+1cA== #jdbc.url=jdbc:mysql://localhost:3306/center?autoReconnect=true&useUnicode=true&characterEncoding=utf-8 #jdbc.username=root diff --git a/parent/center.manager/src/main/resources/xml/app-datasource.xml b/parent/center.manager/src/main/resources/xml/app-datasource.xml index 67f17eb..77cc37b 100644 --- a/parent/center.manager/src/main/resources/xml/app-datasource.xml +++ b/parent/center.manager/src/main/resources/xml/app-datasource.xml @@ -11,6 +11,8 @@ + + @@ -42,11 +44,13 @@ - + + + diff --git a/parent/core.sdk/src/main/java/com/lyms/common/db/DBPasswordCallback.java b/parent/core.sdk/src/main/java/com/lyms/common/db/DBPasswordCallback.java index 05ce080..ca12704 100644 --- a/parent/core.sdk/src/main/java/com/lyms/common/db/DBPasswordCallback.java +++ b/parent/core.sdk/src/main/java/com/lyms/common/db/DBPasswordCallback.java @@ -23,28 +23,28 @@ import com.lyms.util.Base64Utils; */ @SuppressWarnings("serial") public class DBPasswordCallback extends DruidPasswordCallback { - private static final byte[] key = { 9, -1, 0, 5, 39, 8, 6, 19 }; + private static final byte[] key = { 56, 43, -44, 9, 5, -41, 0, -5, -39, 8, 8, -6, 19 }; - public void setProperties(Properties properties) { - super.setProperties(properties); - String pwd = properties.getProperty("password"); - if (StringUtils.isNotBlank(pwd)) { - try { - String password = new String(DES.decrypt(Base64Utils.decode(pwd), key)); - setPassword(password.toCharArray()); - } catch (Exception e) { - setPassword(pwd.toCharArray()); - } - } else { - setPassword("".toCharArray()); - } - } + public void setProperties(Properties properties) { + super.setProperties(properties); + String pwd = properties.getProperty("password"); + if (StringUtils.isNotBlank(pwd)) { + try { + String password = new String(DES.decrypt(Base64Utils.decode(pwd), key)); + setPassword(password.toCharArray()); + } catch (Exception e) { + setPassword(pwd.toCharArray()); + } + } else { + setPassword("".toCharArray()); + } + } - /** - * 数据库密码回调解密 - * + /** + * 数据库密码回调解密 + * - + @@ -52,10 +52,12 @@ public class DBPasswordCallback extends DruidPasswordCallback { - */ - public static void main(String[] args) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException, Exception { - String encrypt = Base64Utils.encode(DES.encrypt("root".getBytes(), key)); - System.out.println(encrypt); - System.out.println( new String(DES.decrypt(Base64Utils.decode(encrypt), key))); - } + */ + public static void main(String[] args) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, + IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException, + Exception { + String encrypt = Base64Utils.encode(DES.encrypt("lyms2015".getBytes(), key)); + System.out.println(encrypt); + System.out.println(new String(DES.decrypt(Base64Utils.decode(encrypt), key))); + } } diff --git a/parent/hospital.web/src/main/resources/dev/jdbc.properties b/parent/hospital.web/src/main/resources/dev/jdbc.properties index 36e8fa9..012280c 100644 --- a/parent/hospital.web/src/main/resources/dev/jdbc.properties +++ b/parent/hospital.web/src/main/resources/dev/jdbc.properties @@ -1,7 +1,7 @@ # Datasource Configurations jdbc.url=jdbc:mysql://119.90.57.26:3306/hospital?autoReconnect=true&useUnicode=true&characterEncoding=utf-8 jdbc.username=hospital -jdbc.password=lyms2015 +jdbc.password=p6CBLGB3pp7LZCJXI2+1cA== druid.initialSize=10 druid.minIdle=10 diff --git a/parent/hospital.web/src/main/resources/xml/app-datasource.xml b/parent/hospital.web/src/main/resources/xml/app-datasource.xml index a1eacf0..2729d5c 100644 --- a/parent/hospital.web/src/main/resources/xml/app-datasource.xml +++ b/parent/hospital.web/src/main/resources/xml/app-datasource.xml @@ -10,6 +10,8 @@ + + --> + +