dingzhongyuan
2021-06-21 cf16e31632fa5c293c978d27e64dfec7b08e3335
ruoyi-admin/src/main/resources/application-prod.yml
@@ -1,21 +1,24 @@
# 数据源配置
spring:
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.cj.jdbc.Driver
    dynamic:
      datasource:
        # 主库数据源
        master:
          driverClassName: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
          username: root
          password: root
        # 从库数据源
        slave:
          driverClassName: com.mysql.cj.jdbc.Driver
          url:
          username:
          password:
    druid:
      # 主库数据源
      master:
        url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
        username: root
        password: root
      # 从库数据源
      slave:
        # 从数据源开关/默认关闭
        enabled: false
        url:
        username:
        password:
      # 初始连接数
      initialSize: 5
      # 最小连接池数量
@@ -35,6 +38,8 @@
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      # 注意这个值和druid原生不一致,默认启动了stat
      filters: stat
      webStatFilter:
        enabled: true
      statViewServlet:
@@ -58,7 +63,7 @@
  # redis 配置
  redis:
    # 地址
    host: 192.168.0.222
    host: localhost
    # 端口,默认为6379
    port: 6379
    # 数据库索引