application.yml 4.8 KB

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