application.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. # 数据源配置
  47. datasource:
  48. type: com.alibaba.druid.pool.DruidDataSource
  49. driverClassName: com.mysql.cj.jdbc.Driver
  50. druid:
  51. # 主库数据源
  52. master:
  53. url: jdbc:mysql://192.168.188.66:3306/jy2024?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
  54. username: root
  55. password: 123456
  56. # 从库数据源
  57. slave:
  58. # 从数据源开关/默认关闭
  59. enabled: false
  60. url:
  61. username:
  62. password:
  63. # 初始连接数
  64. initialSize: 5
  65. # 最小连接池数量
  66. minIdle: 10
  67. # 最大连接池数量
  68. maxActive: 20
  69. # 配置获取连接等待超时的时间
  70. maxWait: 60000
  71. # 配置连接超时时间
  72. connectTimeout: 30000
  73. # 配置网络超时时间
  74. socketTimeout: 60000
  75. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  76. timeBetweenEvictionRunsMillis: 60000
  77. # 配置一个连接在池中最小生存的时间,单位是毫秒
  78. minEvictableIdleTimeMillis: 300000
  79. # 配置一个连接在池中最大生存的时间,单位是毫秒
  80. maxEvictableIdleTimeMillis: 900000
  81. # 配置检测连接是否有效
  82. validationQuery: SELECT 1 FROM DUAL
  83. testWhileIdle: true
  84. testOnBorrow: false
  85. testOnReturn: false
  86. webStatFilter:
  87. enabled: true
  88. statViewServlet:
  89. enabled: true
  90. # 设置白名单,不填则允许所有访问
  91. allow:
  92. url-pattern: /druid/*
  93. # 控制台管理用户名和密码
  94. login-username: jjt
  95. login-password: 123456
  96. filter:
  97. stat:
  98. enabled: true
  99. # 慢SQL记录
  100. log-slow-sql: true
  101. slow-sql-millis: 1000
  102. merge-sql: true
  103. wall:
  104. config:
  105. multi-statement-allow: true
  106. # 资源信息
  107. messages:
  108. # 国际化资源文件路径
  109. basename: i18n/messages
  110. # 文件上传
  111. servlet:
  112. multipart:
  113. # 单个文件大小
  114. max-file-size: 10MB
  115. # 设置总上传的文件大小
  116. max-request-size: 20MB
  117. # 服务模块
  118. devtools:
  119. restart:
  120. # 热部署开关
  121. enabled: true
  122. # redis 配置
  123. redis:
  124. # 地址
  125. host: 192.168.188.66
  126. # 端口,默认为6379
  127. port: 6379
  128. # 数据库索引
  129. database: 0
  130. # 密码
  131. password: redis@123
  132. # 连接超时时间
  133. timeout: 10s
  134. lettuce:
  135. pool:
  136. # 连接池中的最小空闲连接
  137. min-idle: 0
  138. # 连接池中的最大空闲连接
  139. max-idle: 8
  140. # 连接池的最大数据库连接数
  141. max-active: 8
  142. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  143. max-wait: -1ms
  144. # token配置
  145. token:
  146. # 令牌自定义标识
  147. header: Authorization
  148. # 令牌密钥
  149. secret: JJT@basic!2024.
  150. # 令牌有效期(默认30分钟)
  151. expireTime: 30
  152. # MyBatis Plus配置
  153. mybatis-plus:
  154. # 搜索指定包别名
  155. typeAliasesPackage: com.jjt.**.domain
  156. # 配置mapper的扫描,找到所有的mapper.xml映射文件
  157. mapperLocations: classpath*:mapper/**/*Mapper.xml
  158. # 加载全局的配置文件
  159. configLocation: classpath:mybatis/mybatis-config.xml
  160. # PageHelper分页插件
  161. pagehelper:
  162. helperDialect: mysql
  163. supportMethodsArguments: true
  164. params: count=countSql
  165. # Swagger配置
  166. swagger:
  167. # 是否开启swagger
  168. enabled: true
  169. # 请求前缀
  170. pathMapping: /dev-api
  171. # 防止XSS攻击
  172. xss:
  173. # 过滤开关
  174. enabled: true
  175. # 排除链接(多个用逗号分隔)
  176. excludes: /system/notice
  177. # 匹配链接
  178. urlPatterns: /system/*,/monitor/*,/tool/*