| | |
| | | # 数据源配置 |
| | | spring: |
| | | autoconfigure: |
| | | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content |
| | | dynamic: |
| | | #设置默认的数据源或者数据源组,默认值即为 master |
| | | primary: master |
| | | 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 |
| | | # 最小连接池数量 |
| | |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | # 注意这个值和druid原生不一致,默认启动了stat |
| | | filters: stat |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | |
| | | # 单节点配置 |
| | | singleServerConfig: |
| | | # 客户端名称 |
| | | clientName: ${ruoyi-vue-plus.name} |
| | | clientName: ${ruoyi.name} |
| | | # 最小空闲连接数 |
| | | connectionMinimumIdleSize: 32 |
| | | # 连接池大小 |
| | |
| | | subscriptionsPerConnection: 5 |
| | | # DNS监测时间间隔,单位:毫秒 |
| | | dnsMonitoringInterval: 5000 |
| | | |
| | | --- # 监控配置 |
| | | spring: |
| | | boot: |
| | | admin: |
| | | # Spring Boot Admin Client 客户端的相关配置 |
| | | client: |
| | | # 设置 Spring Boot Admin Server 地址 |
| | | url: http://localhost:9090/admin |
| | | instance: |
| | | prefer-ip: true # 注册实例时,优先使用 IP |
| | | username: ruoyi |
| | | password: 123456 |
| | | |
| | | # Actuator 监控端点的配置项 |
| | | management: |
| | | endpoints: |
| | | web: |
| | | # Actuator 提供的 API 接口的根目录。默认为 /actuator |
| | | base-path: /actuator |
| | | exposure: |
| | | # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 |
| | | # 生产环境不建议放开所有 根据项目需求放开即可 |
| | | include: '*' |
| | | endpoint: |
| | | logfile: |
| | | external-file: ./logs/sys-console.log |