From 4466f17938e9ea2e742c612efd66dd64749197c0 Mon Sep 17 00:00:00 2001 From: shuzheng <469741414@qq.com> Date: Sun, 12 Feb 2017 00:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E6=94=BE=E5=88=B0rp?= =?UTF-8?q?c-service=EF=BC=8C=E5=85=B6=E4=BB=96=E6=A8=A1=E5=9D=97=E4=B8=8D?= =?UTF-8?q?=E8=BF=9E=EF=BC=9B=E5=A2=9E=E5=8A=A0generator=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zheng/cms/dao/Generator.java | 8 +- .../src/main/resources/generator.properties | 4 + .../resources/applicationContext-jdbc.xml | 0 .../src/main/resources/jdbc.properties | 0 .../java/com/zheng/upms/dao/Generator.java | 8 +- .../src/main/resources/generator.properties | 4 + .../resources/applicationContext-jdbc.xml | 113 ++++++++++++++++++ .../src/main/resources/jdbc.properties | 0 8 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 zheng-cms/zheng-cms-dao/src/main/resources/generator.properties rename {zheng-common => zheng-cms/zheng-cms-rpc-service}/src/main/resources/applicationContext-jdbc.xml (100%) rename zheng-cms/{zheng-cms-dao => zheng-cms-rpc-service}/src/main/resources/jdbc.properties (100%) create mode 100644 zheng-upms/zheng-upms-dao/src/main/resources/generator.properties create mode 100644 zheng-upms/zheng-upms-rpc-service/src/main/resources/applicationContext-jdbc.xml rename zheng-upms/{zheng-upms-dao => zheng-upms-rpc-service}/src/main/resources/jdbc.properties (100%) diff --git a/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java b/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java index 4fc8b193..6e006441 100644 --- a/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java +++ b/zheng-cms/zheng-cms-dao/src/main/java/com/zheng/cms/dao/Generator.java @@ -11,10 +11,10 @@ public class Generator { // 根据命名规范,只修改此常量值即可 private static String MODULE_PREFIX_NAME = "cms"; - private static String JDBC_DRIVER = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.driver"); - private static String JDBC_URL = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.url"); - private static String JDBC_USERNAME = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.username"); - private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.password"); + private static String JDBC_DRIVER = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.driver"); + private static String JDBC_URL = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.url"); + private static String JDBC_USERNAME = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.username"); + private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.password"); /** * 自动代码生成 diff --git a/zheng-cms/zheng-cms-dao/src/main/resources/generator.properties b/zheng-cms/zheng-cms-dao/src/main/resources/generator.properties new file mode 100644 index 00000000..2f171bc4 --- /dev/null +++ b/zheng-cms/zheng-cms-dao/src/main/resources/generator.properties @@ -0,0 +1,4 @@ +generator.jdbc.driver=com.mysql.jdbc.Driver +generator.jdbc.url=jdbc\:mysql\://127.0.0.1\:3306/zheng?useUnicode\=true&characterEncoding\=utf-8&autoReconnect\=true +generator.jdbc.username=root +generator.jdbc.password=rWd3Hb+AzNg3IXF1b5vD+g== \ No newline at end of file diff --git a/zheng-common/src/main/resources/applicationContext-jdbc.xml b/zheng-cms/zheng-cms-rpc-service/src/main/resources/applicationContext-jdbc.xml similarity index 100% rename from zheng-common/src/main/resources/applicationContext-jdbc.xml rename to zheng-cms/zheng-cms-rpc-service/src/main/resources/applicationContext-jdbc.xml diff --git a/zheng-cms/zheng-cms-dao/src/main/resources/jdbc.properties b/zheng-cms/zheng-cms-rpc-service/src/main/resources/jdbc.properties similarity index 100% rename from zheng-cms/zheng-cms-dao/src/main/resources/jdbc.properties rename to zheng-cms/zheng-cms-rpc-service/src/main/resources/jdbc.properties diff --git a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java index 9db510ff..1a487356 100644 --- a/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java +++ b/zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/Generator.java @@ -11,10 +11,10 @@ public class Generator { // 根据命名规范,只修改此常量值即可 private static String MODULE_PREFIX_NAME = "upms"; - private static String JDBC_DRIVER = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.driver"); - private static String JDBC_URL = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.url"); - private static String JDBC_USERNAME = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.username"); - private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.password"); + private static String JDBC_DRIVER = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.driver"); + private static String JDBC_URL = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.url"); + private static String JDBC_USERNAME = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.username"); + private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.password"); /** * 自动代码生成 diff --git a/zheng-upms/zheng-upms-dao/src/main/resources/generator.properties b/zheng-upms/zheng-upms-dao/src/main/resources/generator.properties new file mode 100644 index 00000000..2f171bc4 --- /dev/null +++ b/zheng-upms/zheng-upms-dao/src/main/resources/generator.properties @@ -0,0 +1,4 @@ +generator.jdbc.driver=com.mysql.jdbc.Driver +generator.jdbc.url=jdbc\:mysql\://127.0.0.1\:3306/zheng?useUnicode\=true&characterEncoding\=utf-8&autoReconnect\=true +generator.jdbc.username=root +generator.jdbc.password=rWd3Hb+AzNg3IXF1b5vD+g== \ No newline at end of file diff --git a/zheng-upms/zheng-upms-rpc-service/src/main/resources/applicationContext-jdbc.xml b/zheng-upms/zheng-upms-rpc-service/src/main/resources/applicationContext-jdbc.xml new file mode 100644 index 00000000..c1a573ed --- /dev/null +++ b/zheng-upms/zheng-upms-rpc-service/src/main/resources/applicationContext-jdbc.xml @@ -0,0 +1,113 @@ + + + + + + + + + + classpath:jdbc.properties + classpath:redis.properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/zheng-upms/zheng-upms-dao/src/main/resources/jdbc.properties b/zheng-upms/zheng-upms-rpc-service/src/main/resources/jdbc.properties similarity index 100% rename from zheng-upms/zheng-upms-dao/src/main/resources/jdbc.properties rename to zheng-upms/zheng-upms-rpc-service/src/main/resources/jdbc.properties