application.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. server:
  2. port: 8080
  3. servlet:
  4. context-path: / #项目名称
  5. session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱
  6. encoding:
  7. force: true
  8. charset: utf-8
  9. enabled: true
  10. error:
  11. include-exception: true
  12. include-message: always
  13. tomcat:
  14. max-swallow-size: 1GB # tomcat容器最大请求大小,可按需修改(一般比最大文件上传大小大一些就行),避免上传文件超出最大限制时容器中断请求,导致获取不到异常信息
  15. # ssl: #https证书配置 配置了之后只能通过https访问应用
  16. # key-store: xxx.pfx 证书文件,证书文件格式具体参考证书分发平台
  17. # key-store-password: 1234 证书密码
  18. #配置日志
  19. logging:
  20. level:
  21. net.mingsoft: debug
  22. net.mingsoft.base.dao.IBaseDao: debug
  23. org.springframework: error
  24. springfox.documentation: error
  25. com.baomidou: error
  26. net.sf: error
  27. config: classpath:log4j-spring.xml
  28. springdoc:
  29. api-docs:
  30. enabled: true #启用swagger功能,false 将不会启用swagger-ui和api-doc 生产的时候务必关掉
  31. swagger-ui:
  32. enabled: true #启用swagger文档(启用时需要swagger功能也开启 api-docs.enable: true),生产的时候务必关掉 访问地址:http://ip|域名/项目发布名/swagger-ui.html
  33. doc-expansion: none #默认不展开
  34. tags-sorter: alpha # 按字母顺序排列标签
  35. operations-sorter: alpha # 按字母顺序排列操作
  36. packages-to-scan: net.mingsoft #扫描包,多个包用逗号隔开
  37. ms:
  38. #scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
  39. xss:
  40. enable: true #xss过滤器的开关
  41. filter-url: /** #过滤的url,多个用逗号分开
  42. # #排除的url,多个用逗号分开,如果怕设置后台过滤麻烦,直接排除 /ms/**
  43. exclude-url: /ms/**,/static/**,/template/**
  44. #过滤的参数名,多个用逗号分开 默认排除菜单、自定模型JSON、模版内容、文章内容,具体根据需要配置其他字段
  45. exclude-field: menuStr,modelField,modelUrl,modelJson,fileContent,contentDetails
  46. # shiro-key: #16位长度,不填写默认随机生成
  47. diy:
  48. html-dir: html
  49. manager:
  50. path: /ms #后台访问的路径,如:http://项目/ms/login.do,生产的时候建议修改
  51. check-code: true #默认开启验证码验证,false验证码不验证
  52. upload:
  53. enable-web: true #启用web层的上传
  54. template: template #模板文件夹支持重命名,不支持路径
  55. path: upload #文件上传路径,可以根据实际写绝对路径(绝对路径需要开发版以上才支持)
  56. mapping: /upload/** #修改需要谨慎,系统第一次部署可以随意修改,如果已经有了上传数据,再次修改会导致之前上传的文件404
  57. denied: exe,jsp,xml,sh,bat,py,ftl,jspx
  58. back-up: /upload_back
  59. multipart:
  60. #最大上传文件大小 单位:KB
  61. max-file-size: 1024000
  62. #文件暂存临时目录 基于tomcat目录下
  63. upload-temp-dir: mcms-temp
  64. #临时文件大小
  65. max-in-memory-size: 1024000
  66. #总上传最大大小 单位:KB -1禁用
  67. max-request-size: -1
  68. #shiro-key: #16位长度,不填写默认随机生成
  69. cookie-name: SHIRO_SESSION_ID
  70. rand-code:
  71. length: 4 #验证码长度
  72. circle: 10 #干扰线条数,值越大越不容易辨别
  73. spring:
  74. datasource:
  75. druid:
  76. initialSize: 5 #初始连接数,默认0
  77. minIdle: 5 #最小连接数,默认8
  78. maxActive: 20 #最大连接数,默认8
  79. maxWait: 2000 #获取连接的最大等待时间,单位毫秒
  80. validationQuery: SELECT 1
  81. testOnBorrow: true #设置从连接池获取连接时是否检查连接有效性,true检查,false不检查
  82. testOnReturn: true #设置从连接池归还连接时是否检查连接有效性,true检查,false不检查
  83. poolPreparedStatements: true #可以支持PSCache(提升写入、查询效率)
  84. # filters: stat,wall #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  85. keepAlive: true #保持长连接
  86. stat-view-servlet:
  87. enabled: false #启用druid监控
  88. profiles:
  89. active: dev
  90. mvc:
  91. pathmatch:
  92. matching-strategy: ANT_PATH_MATCHER
  93. use-suffix-pattern: true
  94. devtools:
  95. restart:
  96. enabled: true
  97. additional-paths: src/main/java
  98. exclude: static/**,WEB-INF/**
  99. servlet:
  100. multipart:
  101. enabled: true
  102. freemarker:
  103. suffix: .ftl
  104. charset: UTF-8
  105. content-type: text/html
  106. allow-request-override: true
  107. allow-session-override: true
  108. expose-request-attributes: true
  109. expose-session-attributes: true
  110. expose-spring-macro-helpers: true
  111. prefer-file-system-access: false
  112. template-loader-path: file:WEB-INF/,file:WEB-INF/manager,classpath:/,classpath:/WEB-INF/manager,classpath:/WEB-INF
  113. settings:
  114. template_update_delay: 1
  115. default_encoding: UTF-8
  116. classic_compatible: true
  117. date_format: yyyy-MM-dd
  118. time_format: HH:mm:ss
  119. datetime_format: yyyy-MM-dd HH:mm:ss
  120. number_format: 0.##
  121. mybatis-plus:
  122. #因为IBaseDao是一个抽象类,没有实体,所以自动注入的时候不会注入,需要手动映射
  123. mapper-locations: classpath*:/net/mingsoft/base/dao/IBaseDao.xml
  124. global-config:
  125. db-config:
  126. id-type: auto
  127. where-strategy: not_empty #防止空串及null拼接条件
  128. configuration:
  129. database-id: mysql