yaml配置:
spring: autoconfigure: exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure datasource: dynamic: primary: mysql #设置默认的数据源或者数据源组,默认值即为master strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. datasource: mysql: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://xxx:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true username: root password: xxx kong_postgresql: # PostgreSQL driver-class-name: org.postgresql.Driver url: jdbc:postgresql://xxx:5432/kong username: kong password: kong
扫一扫访问 Blade技术社区 移动端