application.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # 开发环境配置
  2. server:
  3. # 服务器的HTTP端口,默认为8080
  4. port: 8583
  5. servlet:
  6. # 应用的访问路径
  7. context-path: /
  8. # 服务类型标识(用于跨服务通信判断)
  9. type: app
  10. # undertow 配置
  11. undertow:
  12. # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  13. max-http-post-size: -1
  14. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  15. # 每块buffer的空间大小,越小的空间被利用越充分
  16. buffer-size: 512
  17. # 是否分配的直接内存
  18. direct-buffers: true
  19. threads:
  20. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  21. io: 8
  22. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  23. worker: 256
  24. # 日志配置
  25. logging:
  26. level:
  27. com.forge: debug
  28. org.springframework: error
  29. org.mybatis.spring.mapper: error
  30. config: classpath:logback.xml
  31. # Spring配置
  32. spring:
  33. application:
  34. name: ${project.name}
  35. # 资源信息
  36. messages:
  37. # 国际化资源文件路径
  38. basename: i18n/messages
  39. profiles:
  40. active: dev
  41. # 文件上传
  42. servlet:
  43. multipart:
  44. # 单个文件大小
  45. max-file-size: 10MB
  46. # 设置总上传的文件大小
  47. max-request-size: 20MB
  48. mvc:
  49. # 设置静态资源路径 防止所有请求都去查静态资源
  50. static-path-pattern: /static/**
  51. format:
  52. date-time: yyyy-MM-dd HH:mm:ss
  53. jackson:
  54. # 日期格式化
  55. date-format: yyyy-MM-dd HH:mm:ss
  56. serialization:
  57. # 格式化输出
  58. indent_output: false
  59. # 忽略无法转换的对象
  60. fail_on_empty_beans: false
  61. deserialization:
  62. # 允许对象忽略json中不存在的属性
  63. fail_on_unknown_properties: false
  64. # MyBatisPlus配置
  65. # https://baomidou.com/config/
  66. mybatis-plus:
  67. # 多包名使用
  68. mapperPackage: com.mdframe.forge.**.mapper
  69. # 对应的 XML 文件位置
  70. mapperLocations: classpath*:mapper/**/*Mapper.xml
  71. # 实体扫描,多个package用逗号或者分号分隔
  72. typeAliasesPackage: com.mdframe.forge.**.domain
  73. configuration:
  74. map-underscore-to-camel-case: true
  75. cache-enabled: true
  76. useGeneratedKeys: true
  77. defaultExecutorType: SIMPLE
  78. logImpl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  79. global-config:
  80. dbConfig:
  81. # 主键类型
  82. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  83. # 如需改为自增 需要将数据库表全部设置为自增
  84. idType: ASSIGN_ID
  85. # Sa-Token 配置
  86. sa-token:
  87. # 使用Redis存储Session
  88. alone-redis:
  89. # Redis数据库索引(默认为0)
  90. database: 0
  91. # Redis服务器地址
  92. host: ${spring.data.redis.host}
  93. # Redis服务器连接端口
  94. port: ${spring.data.redis.port}
  95. # Redis服务器连接密码(默认为空)
  96. password: ${spring.data.redis.password}
  97. # 连接超时时间(毫秒)
  98. timeout: 10000
  99. sms:
  100. config-type: interface