spring boot项目可为不同的环境配置相应的配置文件
spring:
datasource:
db-name: sm
profiles:
active: @spring.active@
---
spring:
profiles: test
datasource:
url: jdbc:mysql://localhost:3306/sm?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT
username: fxb
password: crwl_fxb_2019
filters: wall,mergeStat
---
spring:
profiles: produce
datasource:
url: jdbc:mysql://localhost:3306/sm?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT
username: root
password: root
filters: wall,mergeStat