# 环境配置 server: port: 8094 servlet: context-path: /api # 全局接口前缀: 同一个域名提供转发不同路径到不同端口方案 # 条件注入 spel: scheduling: true # 定时任务是否执行 multiSource: false # 是否多数据源配置 # 资源配置 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: connection-init-sql: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci 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 # 对表没有任何操作. 若不设置为 non, 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 # 数据库版本 flyway: enabled: false # 需要配置 jpa.hibernate.ddl-auto 为 none. 否则 flyway.enabled 配置会无效, 在没有数库连接情况下程序无法启动 encoding: UTF-8 locations: classpath:db/migration # 迁移sql脚本文件存放路径,默认db/migration sql-migration-prefix: V # 迁移sql脚本文件名称的前缀,默认V sql-migration-separator: __ # 迁移sql脚本文件名称的分隔符,默认2个下划线__ sql-migration-suffixes: .sql # 迁移sql脚本文件名称的后缀 validate-on-migrate: true # 迁移时是否进行校验,默认true baseline-on-migrate: true # 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表 # jsp mvc: view: prefix: /WEB-INF/jsp/ suffix: .jsp # swagger3 application: name: mjava # swagger3 swagger: enable: false application-name: ${spring.application.name} application-version: 1.0 application-description: mjava-mcli ~> springfox swagger 3.0 try-host: http://localhost:${server.port}/${server.servlet.context-path} # 日志配置 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