application.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # 环境配置
  2. server:
  3. port: 9100
  4. servlet:
  5. context-path: /api # 全局接口前缀: 同一个域名提供转发不同路径到不同端口方案
  6. tomcat:
  7. additional-tld-skip-patterns: osdt_core.jar,osdt_cert.jar # oracle6 忽略依赖包警告
  8. # 条件注入
  9. spel:
  10. scheduling: true # 定时任务是否执行
  11. multiSource: true # 是否多数据源配置
  12. # 资源配置
  13. spring:
  14. profiles:
  15. active: prod
  16. # 热部署
  17. devtools:
  18. restart:
  19. enabled: false
  20. additional-paths: src/main/java # 设置重启的目录
  21. exclude: WEB-INF/** # classpath目录下的WEB-INF文件夹内容修改不重启
  22. # 文件上传
  23. servlet:
  24. multipart:
  25. max-file-size: 10MB
  26. max-request-size: 20MB
  27. # 数据库
  28. datasource:
  29. type: com.zaxxer.hikari.HikariDataSource
  30. hikari:
  31. pool-name: DateHikariCP
  32. minimum-idle: 0
  33. maximum-pool-size: 10
  34. idle-timeout: 30000
  35. max-lifetime: 120000 # 小于数据库超时大于业务执行返回时间[hikari默认30m, mysql默认10m]
  36. connection-timeout: 30000 # 数据库连接超时时间,默认30秒,即30000
  37. # JPA
  38. jpa:
  39. hibernate:
  40. ddl-auto: none # 对表没有任何操作. 若不设置为 non, flyway.enabled 配置会无效, 在没有数据库连接情况下程序无法启动
  41. show-sql: false
  42. open-in-view: false # 开启可用于多对一懒加载, 但可能存在并发缓存问题
  43. properties:
  44. hibernate:
  45. format_sql: true
  46. generate_statistics: false # 生产环境有效
  47. jdbc:
  48. batch_size: 500 # 开启批量更新与删除
  49. batch_versioned_data: true
  50. order_inserts: true
  51. order_updates: true
  52. query:
  53. plan_cache_max_size: 64 # hibernate会缓存sql语句以减少重复编译
  54. plan_parameter_metadata_max_size: 32
  55. plan_cache_max_soft_references: 1024
  56. plan_cache_max_strong_references: 64
  57. # 数据库版本管理
  58. flyway:
  59. enabled: false # 需要配置 jpa.hibernate.ddl-auto 为 none. 否则 flyway.enabled 配置会无效, 在没有数库连接情况下程序无法启动
  60. # jsp
  61. mvc:
  62. view:
  63. prefix: /WEB-INF/jsp/
  64. suffix: .jsp
  65. # swagger3
  66. swagger:
  67. enable: false
  68. # 日志配置
  69. logging:
  70. level:
  71. com.malk: debug
  72. org.springframework: warn
  73. file:
  74. path: ./log
  75. # 路径配置
  76. file:
  77. path:
  78. file: ./tmp/file/
  79. image: ./tmp/image/
  80. tmp: ./tmp/
  81. source:
  82. fonts: ./sys/fonts/simsun.ttc.ttc
  83. # 企业配置
  84. corp:
  85. # 公共服务
  86. servlet:
  87. aliwork: false
  88. dingtalk: false
  89. diwork: true
  90. feishu: true
  91. teambition: true
  92. # 通用设置
  93. timeOut: 300
  94. timeAwait: 600