添加开发环境通用配置文件, 节约开发人员项目配置成本;
This commit is contained in:
parent
bdf7fdb7d8
commit
81df264507
|
|
@ -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 #存储根路径 ( 无需以‘/’结尾 )
|
||||||
|
|
@ -16,8 +16,8 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
# yml填写url连接串, 无需将&符号进行转义
|
# yml填写url连接串, 无需将&符号进行转义
|
||||||
url: jdbc:mysql://127.0.0.1:3306/jeepaydb?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: jeepay
|
username: root
|
||||||
password: 123456
|
password:
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
# yml填写url连接串, 无需将&符号进行转义
|
# yml填写url连接串, 无需将&符号进行转义
|
||||||
url: jdbc:mysql://127.0.0.1:3306/jeepaydb?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: jeepay
|
username: root
|
||||||
password: 123456
|
password:
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
# yml填写url连接串, 无需将&符号进行转义
|
# yml填写url连接串, 无需将&符号进行转义
|
||||||
url: jdbc:mysql://127.0.0.1:3306/jeepaydb?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: jeepay
|
username: root
|
||||||
password: 123456
|
password:
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|
|
||||||
|
|
@ -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根目录)
|
||||||
|
|
||||||
|
#####################################################
|
||||||
|
|
@ -95,6 +95,19 @@
|
||||||
<!-- 作为可执行jar -->
|
<!-- 作为可执行jar -->
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
|
||||||
|
<!-- resources资源配置项 -->
|
||||||
|
<resources>
|
||||||
|
<!-- 通用资源文件 -->
|
||||||
|
<resource><directory>src/main/resources</directory><includes><include>**/*.*</include></includes></resource>
|
||||||
|
|
||||||
|
<!-- 放置通用配置yml文件, 开发时仅配置一套参数即可。 实际生产环境下应在每个项目下 与jar同级目录下新建application.yml覆写对应参数。 -->
|
||||||
|
<resource>
|
||||||
|
<directory>../conf/devCommons</directory>
|
||||||
|
<includes><include>**/*.yml</include></includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ spring:
|
||||||
number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00
|
number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00
|
||||||
datasource:
|
datasource:
|
||||||
# yml填写url连接串, 无需将&符号进行转义
|
# 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
|
username: root
|
||||||
password: root
|
password:
|
||||||
druid:
|
druid:
|
||||||
# 连接池配置项
|
# 连接池配置项
|
||||||
initial-size: 5 #初始化时建立物理连接的个数
|
initial-size: 5 #初始化时建立物理连接的个数
|
||||||
|
|
@ -70,6 +70,6 @@ isys:
|
||||||
|
|
||||||
# 文件系统配置项(系统内oss, 并非云oss)
|
# 文件系统配置项(系统内oss, 并非云oss)
|
||||||
oss-file:
|
oss-file:
|
||||||
root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 )
|
root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 )
|
||||||
public-path: ${isys.oss-file.root-path}/public #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
public-path: ${isys.oss-file.root-path}/public #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
||||||
private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,19 @@
|
||||||
<!-- 作为可执行jar -->
|
<!-- 作为可执行jar -->
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
|
||||||
|
<!-- resources资源配置项 -->
|
||||||
|
<resources>
|
||||||
|
<!-- 通用资源文件 -->
|
||||||
|
<resource><directory>src/main/resources</directory><includes><include>**/*.*</include></includes></resource>
|
||||||
|
|
||||||
|
<!-- 放置通用配置yml文件, 开发时仅配置一套参数即可。 实际生产环境下应在每个项目下 与jar同级目录下新建application.yml覆写对应参数。 -->
|
||||||
|
<resource>
|
||||||
|
<directory>../conf/devCommons</directory>
|
||||||
|
<includes><include>**/*.yml</include></includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ spring:
|
||||||
number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00
|
number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00
|
||||||
datasource:
|
datasource:
|
||||||
# yml填写url连接串, 无需将&符号进行转义
|
# 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
|
username: root
|
||||||
password: root
|
password:
|
||||||
druid:
|
druid:
|
||||||
# 连接池配置项
|
# 连接池配置项
|
||||||
initial-size: 5 #初始化时建立物理连接的个数
|
initial-size: 5 #初始化时建立物理连接的个数
|
||||||
|
|
@ -70,7 +70,7 @@ isys:
|
||||||
|
|
||||||
# 文件系统配置项(系统内oss, 并非云oss)
|
# 文件系统配置项(系统内oss, 并非云oss)
|
||||||
oss-file:
|
oss-file:
|
||||||
root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 )
|
root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 )
|
||||||
public-path: ${isys.oss-file.root-path}/public #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
public-path: ${isys.oss-file.root-path}/public #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
||||||
private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,19 @@
|
||||||
<!-- 作为可执行jar -->
|
<!-- 作为可执行jar -->
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
|
||||||
|
<!-- resources资源配置项 -->
|
||||||
|
<resources>
|
||||||
|
<!-- 通用资源文件 -->
|
||||||
|
<resource><directory>src/main/resources</directory><includes><include>**/*.*</include></includes></resource>
|
||||||
|
|
||||||
|
<!-- 放置通用配置yml文件, 开发时仅配置一套参数即可。 实际生产环境下应在每个项目下 与jar同级目录下新建application.yml覆写对应参数。 -->
|
||||||
|
<resource>
|
||||||
|
<directory>../conf/devCommons</directory>
|
||||||
|
<includes><include>**/*.yml</include></includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ spring:
|
||||||
number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00
|
number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00
|
||||||
datasource:
|
datasource:
|
||||||
# yml填写url连接串, 无需将&符号进行转义
|
# 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
|
username: root
|
||||||
password: 123
|
password:
|
||||||
druid:
|
druid:
|
||||||
# 连接池配置项
|
# 连接池配置项
|
||||||
initial-size: 5 #初始化时建立物理连接的个数
|
initial-size: 5 #初始化时建立物理连接的个数
|
||||||
|
|
@ -69,5 +69,5 @@ isys:
|
||||||
|
|
||||||
# 文件系统配置项(系统内oss, 并非云oss)
|
# 文件系统配置项(系统内oss, 并非云oss)
|
||||||
oss-file:
|
oss-file:
|
||||||
root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 )
|
root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 )
|
||||||
private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue