application.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # 环境配置
  2. server:
  3. port: 9001
  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. # jsp
  58. mvc:
  59. view:
  60. prefix: /WEB-INF/jsp/
  61. suffix: .jsp
  62. # 日志配置
  63. logging:
  64. level:
  65. com.malk: debug
  66. org.springframework: warn
  67. file:
  68. path: ./log
  69. # 路径配置
  70. file:
  71. path:
  72. file: ./tmp/file/
  73. image: ./tmp/image/
  74. tmp: ./tmp/
  75. source:
  76. fonts: ./sys/fonts/simsun.ttc.ttc
  77. # 企业配置
  78. corp:
  79. # 公共服务
  80. servlet:
  81. aliwork: false
  82. dingtalk: false
  83. diwork: true
  84. feishu: true
  85. teambition: true
  86. # 通用设置
  87. timeOut: 300
  88. timeAwait: 600