application-integration-test.yaml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. spring:
  2. main:
  3. lazy-initialization: true # 开启懒加载,加快速度
  4. banner-mode: off # 单元测试,禁用 Banner
  5. --- #################### 数据库相关配置 ####################
  6. spring:
  7. # 数据源配置项
  8. autoconfigure:
  9. exclude:
  10. - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
  11. datasource:
  12. druid: # Druid 【监控】相关的全局配置
  13. web-stat-filter:
  14. enabled: true
  15. stat-view-servlet:
  16. enabled: true
  17. allow: # 设置白名单,不填则允许所有访问
  18. url-pattern: /druid/*
  19. login-username: # 控制台管理用户名和密码
  20. login-password:
  21. filter:
  22. stat:
  23. enabled: true
  24. log-slow-sql: true # 慢 SQL 记录
  25. slow-sql-millis: 100
  26. merge-sql: true
  27. wall:
  28. config:
  29. multi-statement-allow: true
  30. dynamic: # 多数据源配置
  31. druid: # Druid 【连接池】相关的全局配置
  32. initial-size: 5 # 初始连接数
  33. min-idle: 10 # 最小连接池数量
  34. max-active: 20 # 最大连接池数量
  35. max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
  36. time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
  37. min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
  38. max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
  39. validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
  40. test-while-idle: true
  41. test-on-borrow: false
  42. test-on-return: false
  43. primary: master
  44. datasource:
  45. master:
  46. name: ruoyi-vue-pro
  47. url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
  48. driver-class-name: com.mysql.jdbc.Driver
  49. username: root
  50. password: 123456
  51. slave: # 模拟从库,可根据自己需要修改
  52. name: ruoyi-vue-pro
  53. url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
  54. driver-class-name: com.mysql.jdbc.Driver
  55. username: root
  56. password: 123456
  57. # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
  58. redis:
  59. host: 127.0.0.1 # 地址
  60. port: 6379 # 端口
  61. database: 0 # 数据库索引
  62. mybatis:
  63. lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试
  64. --- #################### 定时任务相关配置 ####################
  65. --- #################### 配置中心相关配置 ####################
  66. --- #################### 服务保障相关配置 ####################
  67. # Lock4j 配置项(单元测试,禁用 Lock4j)
  68. # Resilience4j 配置项
  69. resilience4j:
  70. ratelimiter:
  71. instances:
  72. backendA:
  73. limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50
  74. limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500
  75. timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s
  76. register-health-indicator: true # 是否注册到健康监测
  77. --- #################### 监控相关配置 ####################
  78. --- #################### 芋道相关配置 ####################
  79. # 芋道配置项,设置当前项目所有自定义的配置
  80. yudao:
  81. info:
  82. version: 1.0.0
  83. base-package: cn.iocoder.dashboard
  84. web:
  85. api-prefix: /api
  86. controller-package: ${yudao.info.base-package}
  87. security:
  88. token-header: Authorization
  89. token-secret: abcdefghijklmnopqrstuvwxyz
  90. token-timeout: 1d
  91. session-timeout: 30m
  92. mock-enable: true
  93. mock-secret: test
  94. swagger:
  95. enable: false # 单元测试,禁用 Swagger
  96. captcha:
  97. timeout: 5m
  98. width: 160
  99. height: 60
  100. file:
  101. base-path: http://127.0.0.1:${server.port}/${yudao.web.api-prefix}/file/get/
  102. codegen:
  103. base-package: ${yudao.info.base-package}.modules
  104. db-schemas: ${spring.datasource.dynamic.datasource.master.name}
  105. xss:
  106. enable: false
  107. exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
  108. - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
  109. - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求