application.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: vrone
  5. # 版本
  6. version: 3.8.8
  7. # 版权年份
  8. copyrightYear: 2024
  9. # 获取ip地址开关
  10. addressEnabled: false
  11. # 验证码类型 math 数字计算 char 字符验证
  12. captchaType: math
  13. # 开发环境配置
  14. server:
  15. servlet:
  16. # 应用的访问路径
  17. context-path: /
  18. tomcat:
  19. # tomcat的URI编码
  20. uri-encoding: UTF-8
  21. # 连接数满后的排队数,默认为100
  22. accept-count: 1000
  23. threads:
  24. # tomcat最大线程数,默认为200
  25. max: 800
  26. # Tomcat启动初始化的线程数,默认值10
  27. min-spare: 100
  28. # Sa-Token配置
  29. sa-token:
  30. # token 名称(同时也是 cookie 名称)
  31. token-name: satoken
  32. # token 有效期(单位:秒) 12小时,-1 代表永久有效
  33. timeout: 43200
  34. # token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
  35. active-timeout: -1
  36. # 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
  37. is-concurrent: true
  38. # 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token)
  39. is-share: true
  40. # token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
  41. token-style: uuid
  42. # 是否输出操作日志
  43. is-log: true
  44. # 日志配置
  45. logging:
  46. level:
  47. com.ruoyi: debug
  48. org.springframework: warn
  49. # 用户配置
  50. user:
  51. password:
  52. # 密码最大错误次数
  53. maxRetryCount: 5
  54. # 密码锁定时间(默认10分钟)
  55. lockTime: 10
  56. # Spring配置
  57. spring:
  58. # 资源信息
  59. messages:
  60. # 国际化资源文件路径
  61. basename: i18n/messages
  62. profiles:
  63. active: druid
  64. # active: product
  65. # 文件上传
  66. servlet:
  67. multipart:
  68. # 单个文件大小
  69. max-file-size: 10MB
  70. # 设置总上传的文件大小
  71. max-request-size: 20MB
  72. # 服务模块
  73. devtools:
  74. restart:
  75. # 热部署开关
  76. enabled: true
  77. # redis 配置
  78. redis:
  79. # 端口,默认为6379
  80. port: 6379
  81. # 数据库索引
  82. database: 0
  83. # 连接超时时间
  84. timeout: 10s
  85. lettuce:
  86. pool:
  87. # 连接池中的最小空闲连接
  88. min-idle: 0
  89. # 连接池中的最大空闲连接
  90. max-idle: 8
  91. # 连接池的最大数据库连接数
  92. max-active: 8
  93. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  94. max-wait: -1ms
  95. # 数据源配置
  96. datasource:
  97. type: com.alibaba.druid.pool.DruidDataSource
  98. driverClassName: com.mysql.cj.jdbc.Driver
  99. druid:
  100. # 从库数据源
  101. slave:
  102. # 从数据源开关/默认关闭
  103. enabled: false
  104. url:
  105. username:
  106. password:
  107. # 初始连接数
  108. initialSize: 5
  109. # 最小连接池数量
  110. minIdle: 10
  111. # 最大连接池数量
  112. maxActive: 20
  113. # 配置获取连接等待超时的时间
  114. maxWait: 60000
  115. # 配置连接超时时间
  116. connectTimeout: 30000
  117. # 配置网络超时时间
  118. socketTimeout: 60000
  119. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  120. timeBetweenEvictionRunsMillis: 60000
  121. # 配置一个连接在池中最小生存的时间,单位是毫秒
  122. minEvictableIdleTimeMillis: 300000
  123. # 配置一个连接在池中最大生存的时间,单位是毫秒
  124. maxEvictableIdleTimeMillis: 900000
  125. # 配置检测连接是否有效
  126. validationQuery: SELECT 1 FROM DUAL
  127. testWhileIdle: true
  128. testOnBorrow: false
  129. testOnReturn: false
  130. webStatFilter:
  131. enabled: true
  132. statViewServlet:
  133. enabled: true
  134. # 设置白名单,不填则允许所有访问
  135. allow:
  136. url-pattern: /druid/*
  137. # 控制台管理用户名和密码
  138. login-username: ruoyi
  139. login-password: 123456
  140. filter:
  141. stat:
  142. enabled: true
  143. # 慢SQL记录
  144. log-slow-sql: true
  145. slow-sql-millis: 1000
  146. merge-sql: true
  147. wall:
  148. config:
  149. multi-statement-allow: true
  150. # token配置
  151. token:
  152. # 令牌自定义标识
  153. header: Authorization
  154. # 令牌密钥
  155. secret: abcdefghijklmnopqrstuvwxyz
  156. # 令牌有效期(默认30分钟)
  157. expireTime: 30
  158. # MyBatis配置
  159. mybatis:
  160. # 搜索指定包别名
  161. typeAliasesPackage: com.ruoyi.**.domain
  162. # 配置mapper的扫描,找到所有的mapper.xml映射文件
  163. mapperLocations: classpath*:mapper/**/*Mapper.xml
  164. # 加载全局的配置文件
  165. configLocation: classpath:mybatis/mybatis-config.xml
  166. # PageHelper分页插件
  167. pagehelper:
  168. helperDialect: mysql
  169. supportMethodsArguments: true
  170. params: count=countSql
  171. # Swagger配置
  172. swagger:
  173. # 是否开启swagger
  174. enabled: true
  175. # 请求前缀
  176. pathMapping: /
  177. # 防止XSS攻击
  178. xss:
  179. # 过滤开关
  180. enabled: true
  181. # 排除链接(多个用逗号分隔)
  182. excludes: /system/notice
  183. # 匹配链接
  184. urlPatterns: /system/*,/monitor/*,/tool/*