application.yml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. spring:
  2. # 当前配置环境
  3. profiles:
  4. active: @profile.active@ # local # local | dev | prod
  5. main:
  6. banner-mode: off
  7. lazy-initialization: true # 懒加载Bean
  8. jackson:
  9. date-format: yyyy-MM-dd HH:mm:ss # 设置全局的日期格式为年月日时分秒
  10. time-zone: GMT+8 # 世界标准时间,为了方式时差,需要+8小时
  11. servlet:
  12. multipart:
  13. max-file-size: 5GB # 上传文件大小限制
  14. max-request-size: 5GB
  15. messages:
  16. basename: i18n/locale
  17. encoding: UTF-8
  18. mvc:
  19. async:
  20. request-timeout: 600000 # 接口超时时间,默认 60 秒
  21. static-path-pattern: /uploads/**
  22. throw-exception-if-no-handler-found: true
  23. # lettuce:
  24. # pool:
  25. # max-active: 20 # 最大连接数,负值表示没有限制,默认8
  26. # max-wait: -1 # 最大阻塞等待时间,负值表示没限制,默认-1
  27. # max-idle: 8 # 最大空闲连接,默认8
  28. # min-idle: 0 # 最小空闲连接,默认0
  29. web:
  30. resources:
  31. static-locations: classpath:/static/
  32. # (false) 禁用静态资源反射
  33. add-mappings: true
  34. # add-mappings: false
  35. thymeleaf:
  36. # 开启视图解析
  37. enabled: true
  38. #编码格式
  39. encoding: UTF-8
  40. #前缀配置
  41. prefix: classpath:/templates/
  42. # 后缀配置
  43. suffix: .html
  44. #是否使用缓存 开发环境时不设置缓存
  45. cache: false
  46. # 格式为 HTML 格式
  47. mode: HTML
  48. # 配置类型
  49. servlet:
  50. content-type: text/html
  51. # MyBatis ORM
  52. #mybatis:
  53. mybatis-plus:
  54. configuration:
  55. map-underscore-to-camel-case: false
  56. # 开启控制台打印sql语句
  57. # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  58. global-config:
  59. banner: off
  60. mapper-locations:
  61. - classpath:com/backendsys/mapper/*.xml
  62. - classpath:mapper/**/*.xml
  63. # JVM
  64. server:
  65. servlet:
  66. context-path: /
  67. encoding:
  68. charset: UTF-8
  69. # 启用 Gzip 压缩
  70. compression:
  71. enabled: true
  72. mime-types: text/html,text/xml,text/plain,text/css,application/javascript
  73. tomcat:
  74. # 开放宽松请求字符集
  75. relaxed-query-chars: "[,]"
  76. # threads:
  77. # max: 200
  78. # PageHelper分页插件
  79. pagehelper:
  80. helperDialect: mysql
  81. supportMethodsArguments: true
  82. params: count=countSql
  83. page-size-zero: true
  84. # 日志
  85. logging:
  86. # config: classpath:log4j2.xml
  87. level:
  88. root: INFO # WARN
  89. pattern:
  90. console: "%d{yyyy-MM-dd-HH:mm:ss} [%thread] %highlight(%-5level) %logger- %msg%n"
  91. file: "%d{yyyy-MM-dd-HH:mm} [%thread] %highlight(%-5level) %logger- %msg%n"
  92. logback:
  93. rollingpolicy:
  94. max-history: 7
  95. # name: /Users/mure/MyProject/QuickLaunchSpring/BackendSys/log/springLog.log
  96. # %d{HH:mm:ss.SSS}:日志输出时间。
  97. # %thread:输出日志的进程名,这在Web应用以及异步任务处理中很有用。
  98. # %-5level:日志级别,使用5个字符靠左对齐。
  99. # %logger-:日志输出者的名称。
  100. # %msg:日志消息。
  101. # %n:平台的换行符
  102. # 接口/路径白名单 (JWT/OAuth2)
  103. # com/backendsys/config/Security/filter/JwtAuthenticationFilter.java
  104. # com/backendsys/config/Security/SecurityConfig.java
  105. whitelist:
  106. static:
  107. /,
  108. /*.html,
  109. /*.ico,
  110. /images/**,
  111. /uploads/**,
  112. /swagger-ui/index.html,
  113. /swagger-ui/**,
  114. /docs/**,
  115. /v3/**
  116. jwt:
  117. /api/comfyui,
  118. /api/webhook,
  119. /api/public/**,
  120. /api/v2/public/**,
  121. /api/system/auth/**,
  122. /api/v2/system/auth/**,
  123. /api/b2c/member/auth/**,
  124. /api/test/**,
  125. /ws/**,
  126. /wss/**
  127. ## 全局静态变量 ##
  128. # HTTP EXCHANGE 远程地址
  129. # HTTP_EXCHANGE_URI: https://jsonplaceholder.typicode.com
  130. # [语言]
  131. DEFAULT_LANGUAGE: zh
  132. # [时区]
  133. DEFAULT_TIME_ZONE: Asia/Shanghai
  134. # [安全] 图形验证码 过期时间 60 秒
  135. CAPTCHA_DURATION: 60000
  136. # [安全] 系统用户登录 Token 过期时间 (86400000毫秒 = 1天 = 24小时) (如果 login.is_remember 则为7天)
  137. #TOKEN_DURATION_SYSTEM: 86400000
  138. # [安全] 会员用户登录 Token 过期时间 (604800000毫秒 = 7天)
  139. TOKEN_DURATION_MEMBER: 604800000
  140. # [安全] 限制同个用户调用接口的并发会话数量 (默认-1不限制)
  141. # (防止恶意用户同时使用多个会话进行非法操作)
  142. MAXIMUM_SESSIONS: -1
  143. ##监控器 Actuator
  144. #management:
  145. # # 端点开放控制
  146. # endpoint:
  147. # # 打开 shutdown 接口,默认的时候仅有它是 false
  148. # shutdown:
  149. # enabled: true
  150. # # 端点全局配置
  151. # health:
  152. # show-details: always
  153. # endpoints:
  154. # web:
  155. # # 配置开放所有端点
  156. # exposure:
  157. # include: "*"
  158. # # 修改访问路径 2.0之前默认是/; 2.0及以后默认是/actuator可以通过这个属性值修改
  159. # base-path: /api/system/actuator
  160. ## 数据库表唯一值的错误提示配置
  161. ## (在全局异常 GlobalExceptionHandler 中的 handleDuplicateKeyException 配置)
  162. #fieldMappings:
  163. # username: 用户名称已存在
  164. # nickname: 昵称已存在
  165. # role_name: 角色名称已存在