| | |
| | | --- #################### 数据库相关配置 #################### |
| | | spring: |
| | | |
| | | # 数据源配置项 |
| | | autoconfigure: |
| | | exclude: |
| | | - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 |
| | | # - de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置 |
| | | # - de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置 |
| | | # - de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置 |
| | | # - de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置 |
| | | - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | # - de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration |
| | | # - de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration |
| | | # - de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration |
| | | # - de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration |
| | | datasource: |
| | | druid: # Druid 【监控】相关的全局配置 |
| | | druid: |
| | | web-stat-filter: |
| | | enabled: true |
| | | stat-view-servlet: |
| | | enabled: true |
| | | allow: # 设置白名单,不填则允许所有访问 |
| | | allow: |
| | | url-pattern: /druid/* |
| | | login-username: # 控制台管理用户名和密码 |
| | | login-username: |
| | | login-password: |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | log-slow-sql: true # 慢 SQL 记录 |
| | | log-slow-sql: true |
| | | slow-sql-millis: 100 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | dynamic: # 多数据源配置 |
| | | druid: # Druid 【连接池】相关的全局配置 |
| | | initial-size: 1 # 初始连接数 |
| | | min-idle: 1 # 最小连接池数量 |
| | | max-active: 20 # 最大连接池数量 |
| | | max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 |
| | | time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 |
| | | min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 |
| | | max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 |
| | | validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 |
| | | dynamic: |
| | | druid: |
| | | initial-size: 1 |
| | | min-idle: 1 |
| | | max-active: 20 |
| | | max-wait: 600000 |
| | | time-between-eviction-runs-millis: 60000 |
| | | min-evictable-idle-time-millis: 300000 |
| | | max-evictable-idle-time-millis: 900000 |
| | | validation-query: SELECT 1 FROM DUAL |
| | | test-while-idle: true |
| | | test-on-borrow: false |
| | | test-on-return: false |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: jdbc:mysql://172.16.8.100:3306/iailab-plat?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |
| | | # url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 |
| | | # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例 |
| | | # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 |
| | | # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 |
| | | url: jdbc:mysql://172.16.8.100:3306/iailab_plat_system?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true |
| | | # url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai |
| | | # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro |
| | | # url: jdbc:oracle:thin:@127.0.0.1:1521:xe |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro |
| | | # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO |
| | | username: root |
| | | password: 123456 |
| | | # username: sa # SQL Server 连接的示例 |
| | | # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例 |
| | | # username: SYSDBA # DM 连接的示例 |
| | | # password: SYSDBA # DM 连接的示例 |
| | | slave: # 模拟从库,可根据自己需要修改 |
| | | lazy: true # 开启懒加载,保证启动速度 |
| | | url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true |
| | | # username: sa |
| | | # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W |
| | | # username: SYSDBA |
| | | # password: SYSDBA |
| | | slave: |
| | | lazy: true |
| | | url: jdbc:mysql://172.16.8.100:3306/iailab-plat?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true |
| | | username: root |
| | | password: 123456 |
| | | |
| | | # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 |
| | | redis: |
| | | host: 172.16.8.100 # 地址 |
| | | port: 6379 # 端口 |
| | | database: 0 # 数据库索引 |
| | | password: 123456 # 密码,建议生产环境开启 |
| | | host: 172.16.8.100 |
| | | port: 6379 |
| | | database: 0 |
| | | password: 123456 |
| | | |
| | | --- #################### MQ 消息队列相关配置 #################### |
| | | |
| | | # rocketmq 配置项,对应 RocketMQProperties 配置类 |
| | | rocketmq: |
| | | name-server: 127.0.0.1:9876 # RocketMQ Namesrv |
| | | name-server: 172.16.8.100:9876 |
| | | |
| | | spring: |
| | | # RabbitMQ 配置项,对应 RabbitProperties 配置类 |
| | | rabbitmq: |
| | | host: 127.0.0.1 # RabbitMQ 服务的地址 |
| | | port: 5672 # RabbitMQ 服务的端口 |
| | | username: guest # RabbitMQ 服务的账号 |
| | | password: guest # RabbitMQ 服务的密码 |
| | | # Kafka 配置项,对应 KafkaProperties 配置类 |
| | | kafka: |
| | | bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔 |
| | | host: 172.16.8.200 |
| | | port: 5672 |
| | | username: admin |
| | | password: admin123 |
| | | |
| | | --- #################### 定时任务相关配置 #################### |
| | | kafka: |
| | | bootstrap-servers: 172.16.8.100:9092 |
| | | |
| | | xxl: |
| | | job: |
| | | enabled: false # 是否开启调度中心,默认为 true 开启 |
| | | enabled: false |
| | | admin: |
| | | addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址 |
| | | addresses: http://172.16.8.100:9090/xxl-job-admin |
| | | |
| | | --- #################### 服务保障相关配置 #################### |
| | | |
| | | # Lock4j 配置项 |
| | | lock4j: |
| | | acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 |
| | | expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 |
| | | acquire-timeout: 3000 |
| | | expire: 30000 |
| | | |
| | | --- #################### 监控相关配置 #################### |
| | | |
| | | # Actuator 监控端点的配置项 |
| | | management: |
| | | endpoints: |
| | | web: |
| | | base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator |
| | | base-path: /actuator |
| | | exposure: |
| | | include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 |
| | | include: '*' |
| | | |
| | | # Spring Boot Admin 配置项 |
| | | spring: |
| | | boot: |
| | | admin: |
| | | # Spring Boot Admin Client 客户端的相关配置 |
| | | client: |
| | | instance: |
| | | service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] |
| | | # Spring Boot Admin Server 服务端的相关配置 |
| | | context-path: /admin # 配置 Spring |
| | | service-host-type: IP |
| | | context-path: /admin |
| | | |
| | | # 日志文件配置 |
| | | logging: |
| | | level: |
| | | # 配置自己写的 MyBatis Mapper 打印日志 |
| | | com.iailab.module.infra.dal.mysql: debug |
| | | com.iailab.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info,避免和 GlobalExceptionHandler 重复打印 |
| | | com.iailab.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info |
| | | com.iailab.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO |
| | | com.iailab.module.infra.dal.mysql.file.FileConfigMapper: INFO |
| | | |
| | | --- #################### 平台相关配置 #################### |
| | | |
| | | # 平台配置项,设置当前项目所有自定义的配置 |
| | | iailab: |
| | | env: # 多环境的配置项 |
| | | env: |
| | | tag: ${HOSTNAME} |
| | | security: |
| | | mock-enable: true |
| | | access-log: # 访问日志的配置项 |
| | | access-log: |
| | | enable: false |