123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- # 环境配置
- server:
- port: 9001
- servlet:
- context-path: /api # 全局接口前缀: 同一个域名提供转发不同路径到不同端口方案
- # 条件注入
- spel:
- scheduling: true # 定时任务是否执行
- multiSource: true # 是否多数据源配置
- # 资源配置
- spring:
- profiles:
- active: prod
- # 热部署
- devtools:
- restart:
- enabled: false
- additional-paths: src/main/java # 设置重启的目录
- exclude: WEB-INF/** # classpath目录下的WEB-INF文件夹内容修改不重启
- # 文件上传
- servlet:
- multipart:
- max-file-size: 10MB
- max-request-size: 20MB
- # 数据库
- datasource:
- type: com.zaxxer.hikari.HikariDataSource
- hikari:
- pool-name: DateHikariCP
- minimum-idle: 0
- maximum-pool-size: 10
- idle-timeout: 30000
- max-lifetime: 120000 # 小于数据库超时大于业务执行返回时间[hikari默认30m, mysql默认10m]
- connection-timeout: 30000 # 数据库连接超时时间,默认30秒,即30000
- # JPA
- jpa:
- hibernate:
- ddl-auto: none # 对表没有任何操作. 若不设置为 none, flyway.enabled 配置会无效, 在没有数据库连接情况下程序无法启动
- show-sql: false
- open-in-view: false # 开启可用于多对一懒加载, 但可能存在并发缓存问题
- properties:
- hibernate:
- format_sql: true
- generate_statistics: false # 生产环境有效
- jdbc:
- batch_size: 500 # 开启批量更新与删除
- batch_versioned_data: true
- order_inserts: true
- order_updates: true
- query:
- plan_cache_max_size: 64 # hibernate会缓存sql语句以减少重复编译
- plan_parameter_metadata_max_size: 32
- plan_cache_max_soft_references: 1024
- plan_cache_max_strong_references: 64
- # jsp
- mvc:
- view:
- prefix: /WEB-INF/jsp/
- suffix: .jsp
- # 日志配置
- logging:
- level:
- com.malk: debug
- org.springframework: warn
- file:
- path: ./log
- # 路径配置
- file:
- path:
- file: ./tmp/file/
- image: ./tmp/image/
- tmp: ./tmp/
- source:
- fonts: ./sys/fonts/simsun.ttc.ttc
- # 企业配置
- corp:
- # 公共服务
- servlet:
- aliwork: false
- dingtalk: false
- diwork: true
- feishu: true
- teambition: true
- # 通用设置
- timeOut: 300
- timeAwait: 600
|