配置文件把测试环境和正式环境分开

This commit is contained in:
wangqiong
2024-04-28 17:00:13 +08:00
parent af8acf5516
commit cad0747ac4
+21 -5
View File
@@ -22,13 +22,13 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://121.40.189.20:3306/onlyoffice?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false
url: jdbc:mysql://121.40.189.20:3306/onlyoffice_test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
redis:
host: 121.40.189.20
port: 6389
database: 0
database: 1
mybatis-plus:
# global-config:
@@ -45,13 +45,29 @@ spring:
config:
activate:
on-profile: dev
filepath: C:/onlyoffice/data/files
serverhost: http://172.16.0.254
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://121.40.189.20:3306/onlyoffice_test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
filepath: /home/ruoyi/uploadPath/onlyoffice/data/files
serverhost: http://121.40.189.20
---
#生产环境属性配置
spring:
config:
activate:
on-profile: prod
filepath: /onlyoffice/data/files
redis:
host: 121.40.189.20
port: 6389
database: 0
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://121.40.189.20:3306/onlyoffice?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
filepath: /home/ruoyi/uploadPath/onlyoffice/data/files
serverhost: http://121.40.189.20