spring: datasource: dynamic: primary: master #设置默认的数据源或者数据源组,默认值即为master strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. datasource: master: driver-class-name: org.postgresql.Driver username: postgres password: 1234qwer type: com.zaxxer.hikari.HikariDataSource url: jdbc:postgresql://localhost:5432/operatemonitordb?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true middleGround: driver-class-name: org.postgresql.Driver username: postgres password: 1234qwer type: com.zaxxer.hikari.HikariDataSource url: jdbc:postgresql://localhost:5432/operatemonitordb?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true knife4j: enable: true