提交 6fd92fa2 authored 作者: Matrix's avatar Matrix

refactor(分环境功能): 多环境的代码优化

上级 737620c0
...@@ -13,6 +13,25 @@ ...@@ -13,6 +13,25 @@
<name>kt-web</name> <name>kt-web</name>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>dev</spring.profiles.active>
</properties>
</profile>
<profile>
<id>local</id>
<properties>
<spring.profiles.active>local</spring.profiles.active>
</properties>
</profile>
</profiles>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.matrix</groupId> <groupId>org.matrix</groupId>
......
server:
port: 8765
spring:
application:
name: keystone
data:
mongodb:
uri: mongodb://192.168.100.247:27017/key_stone
datasource:
dynamic:
primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
datasource:
master: #增加默认数据源
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.247:3306/key_stone?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
username: root
password: 123456
zentao:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.247:3306/zentao?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&&zeroDateTimeBehavior=convertToNull
username: root
password: 123456
mybatis-plus:
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
type-enums-package: org.matrix.enums
baseJsPath: syntaxCheck.js
server:
port: 8765
spring:
application:
name: keystone
data:
mongodb:
uri: mongodb://127.0.0.1:27017/key_stone
datasource:
dynamic:
primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
datasource:
master: #增加默认数据源
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/key_stone?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
username: root
password: ldf3291369
zentao:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/zentao?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&&zeroDateTimeBehavior=convertToNull
username: root
password: ldf3291369
mybatis-plus:
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
type-enums-package: org.matrix.enums
baseJsPath: syntaxCheck.js
server:
port: 8765
spring: spring:
application: application:
name: keystone name: keystone
data: config:
mongodb: activate:
uri: mongodb://192.168.100.247:27017/key_stone on-profile: @spring.profiles.active@
datasource: \ No newline at end of file
dynamic:
primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
datasource:
master: #增加默认数据源
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.247:3306/key_stone?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
username: root
password: 123456
zentao:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.247:3306/zentao?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&&zeroDateTimeBehavior=convertToNull
username: root
password: 123456
mybatis-plus:
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
type-enums-package: org.matrix.enums
baseJsPath: syntaxCheck.js
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论