application.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. spring:
  2. main:
  3. allow-bean-definition-overriding: true
  4. #jackson配置
  5. jackson:
  6. # 日期格式化
  7. date-format: yyyy-MM-dd HH:mm:ss
  8. serialization:
  9. # 格式化输出
  10. indent_output: false
  11. # 忽略无法转换的对象
  12. fail_on_empty_beans: false
  13. deserialization:
  14. # 允许对象忽略json中不存在的属性
  15. fail_on_unknown_properties: false
  16. cloud:
  17. # 网关配置
  18. gateway:
  19. discovery:
  20. locator:
  21. lowerCaseServiceId: true
  22. enabled: true
  23. routes:
  24. # 认证中心
  25. - id: ruoyi-auth
  26. uri: lb://ruoyi-auth
  27. predicates:
  28. - Path=/auth/**
  29. filters:
  30. # 验证码处理
  31. - CacheRequestFilter
  32. - ValidateCodeFilter
  33. - StripPrefix=1
  34. # 代码生成
  35. - id: ruoyi-gen
  36. uri: lb://ruoyi-gen
  37. predicates:
  38. - Path=/code/**
  39. filters:
  40. - StripPrefix=1
  41. # 定时任务
  42. - id: ruoyi-job
  43. uri: lb://ruoyi-job
  44. predicates:
  45. - Path=/schedule/**
  46. filters:
  47. - StripPrefix=1
  48. # 系统模块
  49. - id: ruoyi-system
  50. uri: lb://ruoyi-system
  51. predicates:
  52. - Path=/system/**
  53. filters:
  54. - StripPrefix=1
  55. # 文件服务
  56. - id: ruoyi-file
  57. uri: lb://ruoyi-file
  58. predicates:
  59. - Path=/file/**
  60. filters:
  61. - StripPrefix=1
  62. # 安全配置
  63. security:
  64. # 验证码
  65. captcha:
  66. # 是否开启验证码
  67. enabled: true
  68. # 验证码类型 math 数组计算 char 字符验证
  69. type: MATH
  70. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  71. category: CIRCLE
  72. # 数字验证码位数
  73. numberLength: 1
  74. # 字符验证码长度
  75. charLength: 4
  76. # 防止XSS攻击
  77. xss:
  78. enabled: true
  79. excludeUrls:
  80. - /system/notice
  81. # 不校验白名单
  82. ignore:
  83. whites:
  84. - /auth/logout
  85. - /auth/login
  86. - /auth/register
  87. - /*/v2/api-docs
  88. - /csrf
  89. # feign 配置
  90. feign:
  91. sentinel:
  92. enabled: true
  93. okhttp:
  94. enabled: true
  95. httpclient:
  96. enabled: false
  97. client:
  98. config:
  99. default:
  100. connectTimeout: 10000
  101. readTimeout: 10000
  102. compression:
  103. request:
  104. enabled: true
  105. response:
  106. enabled: true
  107. # 暴露监控端点
  108. management:
  109. endpoints:
  110. web:
  111. exposure:
  112. include: '*'
  113. # redisson 缓存配置
  114. redisson:
  115. cacheGroup:
  116. # 用例: @Cacheable(cacheNames="groupId", key="#XXX") 方可使用缓存组配置
  117. - groupId: redissonCacheMap
  118. # 组过期时间(脚本监控)
  119. ttl: 60000
  120. # 组最大空闲时间(脚本监控)
  121. maxIdleTime: 60000
  122. # 组最大长度
  123. maxSize: 0
  124. # 分布式锁 lock4j 全局配置
  125. lock4j:
  126. # 获取分布式锁超时时间,默认为 3000 毫秒
  127. acquire-timeout: 3000
  128. # 分布式锁的超时时间,默认为 30 毫秒
  129. expire: 30000
  130. # mybatis配置
  131. mybatis:
  132. # 搜索指定包别名
  133. typeAliasesPackage: com.ruoyi.**.domain
  134. # 配置mapper的扫描,找到所有的mapper.xml映射文件
  135. mapperLocations: classpath:mapper/**/*.xml
  136. # swagger配置
  137. swagger:
  138. license: Powered By ruoyi
  139. licenseUrl: https://ruoyi.vip