diff --git a/conf/devCommons/config/application.yml b/conf/devCommons/config/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..13d7329d13fd59e5bd148a0367a9dc290810613d --- /dev/null +++ b/conf/devCommons/config/application.yml @@ -0,0 +1,30 @@ +################################# +# 开发环境通用配置文件放置目录 +################################# +spring: + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: root + password: root + redis: + host: 127.0.0.1 + port: 6379 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + + #日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: ./logs #日志存放地址 + +#系统业务参数 +isys: + oss-file: + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) diff --git a/conf/manager/application.yml b/conf/manager/application.yml index b97ff675f0098446671d86d5f43c9c96dd9031a1..f8a0ebb7df2f92599bc040f57ee4554fa36316af 100644 --- a/conf/manager/application.yml +++ b/conf/manager/application.yml @@ -16,8 +16,8 @@ spring: datasource: # yml填写url连接串, 无需将&符号进行转义 url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false - username: jeepay - password: 123456 + username: root + password: redis: host: 127.0.0.1 port: 6379 diff --git a/conf/merchant/application.yml b/conf/merchant/application.yml index 029965f58860336ffbfabea1930b2aa11e7c5637..c3710c8fd7b9127cf31117852f5a4566cd348283 100644 --- a/conf/merchant/application.yml +++ b/conf/merchant/application.yml @@ -16,8 +16,8 @@ spring: datasource: # yml填写url连接串, 无需将&符号进行转义 url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false - username: jeepay - password: 123456 + username: root + password: redis: host: 127.0.0.1 port: 6379 diff --git a/conf/payment/application.yml b/conf/payment/application.yml index 177bcfea4b0bf7fc0002873b91d8bf81f2b41b08..69f03be0e270acfa7a8d1e2aa47590fcdd18ab4c 100644 --- a/conf/payment/application.yml +++ b/conf/payment/application.yml @@ -16,8 +16,8 @@ spring: datasource: # yml填写url连接串, 无需将&符号进行转义 url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false - username: jeepay - password: 123456 + username: root + password: redis: host: 127.0.0.1 port: 6379 diff --git a/conf/readme.txt b/conf/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..46d12f76e88c7584687c2a31be88388d44a959e7 --- /dev/null +++ b/conf/readme.txt @@ -0,0 +1,20 @@ + +文件夹用途: 用于放置开发环境的通用配置项和生产环境下的项目配置模板。 + +1. 【devCommons】: +开发环境通用配置文件放置目录。 更改此目录后将覆写 manager/merchant/payment 项目下的application.yml文件对应参数,从而达到每个项目不必单独配置的目的,更加节约开发时间。 + +2. 该文件夹下的【manager/merchant/payment】: +文件为上线部署时与jar同级目录下的application.yml建议配置项的模板。 需更改为实际参数, 也可按需添加。 + + +扩展知识: +##################################################### + +# spring boot支持外部application.yml 读取优先级为: +# 1、file:./config/(当前目录下的config文件夹) +# 2、file:./(当前目录) +# 3、classpath:/config/(classpath下的config目录) +# 4、classpath:/(classpath根目录) + +##################################################### \ No newline at end of file diff --git a/jeepay-manager/pom.xml b/jeepay-manager/pom.xml index 9dfc058640a9ae28bb0ac9d277f30ddfea262a88..104487d1719268cb051d0eecc30ec0600565cf97 100644 --- a/jeepay-manager/pom.xml +++ b/jeepay-manager/pom.xml @@ -95,6 +95,19 @@ ${project.artifactId} + + + + + src/main/resources**/*.* + + + + ../conf/devCommons + **/*.yml + + + org.springframework.boot diff --git a/jeepay-manager/src/main/resources/application.yml b/jeepay-manager/src/main/resources/application.yml index 0f0bdfaba379a08770ba4274c3bc88a9824fa99f..041dd2eb6912766a53ea076844ffbbd4c1ecbf5a 100644 --- a/jeepay-manager/src/main/resources/application.yml +++ b/jeepay-manager/src/main/resources/application.yml @@ -20,9 +20,9 @@ spring: number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00 datasource: # yml填写url连接串, 无需将&符号进行转义 - url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false username: root - password: root + password: druid: # 连接池配置项 initial-size: 5 #初始化时建立物理连接的个数 @@ -70,6 +70,6 @@ isys: # 文件系统配置项(系统内oss, 并非云oss) oss-file: - root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 ) + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) public-path: ${isys.oss-file.root-path}/public #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) diff --git a/jeepay-merchant/pom.xml b/jeepay-merchant/pom.xml index 578834921c4e5513db593e6e038487fc670d0529..8f0259ccc7838ee25b935dd0eb77b1ee48114fd5 100644 --- a/jeepay-merchant/pom.xml +++ b/jeepay-merchant/pom.xml @@ -94,6 +94,19 @@ ${project.artifactId} + + + + + src/main/resources**/*.* + + + + ../conf/devCommons + **/*.yml + + + org.springframework.boot diff --git a/jeepay-merchant/src/main/resources/application.yml b/jeepay-merchant/src/main/resources/application.yml index b0e43c06ee5d13cb44786c01908e6ed29d4feff0..57a3f1b1275f8e82e75c44e8ee42453dc4c39859 100644 --- a/jeepay-merchant/src/main/resources/application.yml +++ b/jeepay-merchant/src/main/resources/application.yml @@ -20,9 +20,9 @@ spring: number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00 datasource: # yml填写url连接串, 无需将&符号进行转义 - url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false username: root - password: root + password: druid: # 连接池配置项 initial-size: 5 #初始化时建立物理连接的个数 @@ -70,7 +70,7 @@ isys: # 文件系统配置项(系统内oss, 并非云oss) oss-file: - root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 ) + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) public-path: ${isys.oss-file.root-path}/public #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) diff --git a/jeepay-payment/pom.xml b/jeepay-payment/pom.xml index 3c95da334e2a0f7fef5ba97e6f5d680910c1740d..c0d0cc84882bfe42ecc378748ab0a5b327c73920 100644 --- a/jeepay-payment/pom.xml +++ b/jeepay-payment/pom.xml @@ -106,6 +106,19 @@ ${project.artifactId} + + + + + src/main/resources**/*.* + + + + ../conf/devCommons + **/*.yml + + + org.springframework.boot diff --git a/jeepay-payment/src/main/resources/application.yml b/jeepay-payment/src/main/resources/application.yml index 9c9a503987184f114b7e0066fa524d10b235e8c6..fc7a85f53442d9338526e61a462c68f2ee7c8791 100644 --- a/jeepay-payment/src/main/resources/application.yml +++ b/jeepay-payment/src/main/resources/application.yml @@ -20,9 +20,9 @@ spring: number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00 datasource: # yml填写url连接串, 无需将&符号进行转义 - url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false username: root - password: 123 + password: druid: # 连接池配置项 initial-size: 5 #初始化时建立物理连接的个数 @@ -69,5 +69,5 @@ isys: # 文件系统配置项(系统内oss, 并非云oss) oss-file: - root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 ) + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )