application.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # 项目相关配置
  2. eco:
  3. # 名称
  4. name: eco-boot
  5. # # 版本
  6. # version: ${revision}
  7. # # 版权年份
  8. # copyrightYear: 2025 ~ 2028
  9. # Spring配置
  10. spring:
  11. application:
  12. name: ${eco.name}
  13. profiles:
  14. active: @profiles.active@
  15. mvc:
  16. format:
  17. date-time: yyyy-MM-dd HH:mm:ss
  18. servlet:
  19. load-on-startup: 1
  20. jackson:
  21. time-zone: GMT+8
  22. date-format: yyyy-MM-dd HH:mm:ss
  23. serialization:
  24. indent-output: false
  25. fail-on-empty-beans: false
  26. write-dates-as-timestamps: false
  27. deserialization:
  28. fail-on-unknown-properties: false
  29. servlet:
  30. multipart:
  31. max-file-size: 100MB
  32. max-request-size: 1000MB
  33. threads:
  34. virtual:
  35. enabled: true
  36. # 开发环境配置
  37. server:
  38. # 服务器的HTTP端口,默认为8080
  39. port: 9040
  40. servlet:
  41. # 应用的访问路径
  42. context-path: /
  43. # Sa-Token配置
  44. sa-token:
  45. # token名称 (同时也是cookie名称)
  46. token-name: Authorization
  47. # token固定超时 设为七天 (必定过期) 单位: 秒
  48. timeout: 604800
  49. # 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
  50. # token最低活跃时间 (指定时间无操作就过期) 单位: 秒
  51. active-timeout: 1800
  52. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  53. is-concurrent: true
  54. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  55. is-share: false
  56. # token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
  57. token-style: uuid
  58. # 是否输出操作日志
  59. is-log: false
  60. # 是否打印log
  61. is-print: false
  62. # jwt秘钥
  63. jwt-secret-key: uWqxTNKHjmIfDohOgZCGwElMdJ
  64. # security配置
  65. security:
  66. # 排除路径
  67. excludes:
  68. # 静态资源
  69. - /*.html
  70. - /**/*.html
  71. - /**/*.css
  72. - /**/*.js
  73. - /profile/**
  74. # 公共路径
  75. - /favicon.ico
  76. - /error
  77. # actuator 监控配置
  78. - /actuator
  79. - /actuator/**
  80. # 其它链接
  81. - /login
  82. # MyBatisFlex公共配置
  83. mybatis-flex:
  84. # 搜索指定包别名
  85. type-aliases-package: org.eco.vip.**.domain.**
  86. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级:com.**.**.mapper
  87. mapper-package: org.eco.vip.**.mapper
  88. # 配置mapper的扫描,找到所有的mapper.xml映射文件
  89. mapper-locations: classpath*:mapper/**/*Mapper.xml
  90. configuration:
  91. # 自动驼峰命名规则(camel case)映射
  92. map_underscore_to_camel_case: true
  93. # MyBatis 自动映射策略
  94. auto_mapping_behavior: FULL
  95. # MyBatis 自动映射时未知列或未知属性处理策
  96. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  97. auto_mapping_unknown_column_behavior: NONE
  98. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  99. # 关闭日志记录 org.apache.ibatis.logging.nologging.NoLoggingImpl
  100. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  101. #log_impl: org.apache.ibatis.logging.stdout.StdOutImpl
  102. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  103. cacheEnabled: true
  104. global-config:
  105. # 逻辑删除存在0
  106. normal-value-of-logic-delete: '0'
  107. # 逻辑已删除1
  108. deleted-value-of-logic-delete: '1'
  109. # 默认的逻辑删除字段
  110. logic-delete-column: del_flag
  111. # 默认的多租户字段
  112. tenant-column: tenant_id
  113. # 默认的乐观锁字段
  114. version-column: version
  115. # 是否控制台打印 MyBatis-Flex 的 LOGO 及版本号
  116. print-banner: false
  117. # 全局的 ID 生成策略配置:雪花算法:snowFlakeId、独创的 FlexID 算法:flexId、UUIDKeyGenerator:uuid
  118. key-config:
  119. key-type: Generator
  120. value: flexId
  121. # easy-trans 配置
  122. easy-trans:
  123. # 字典缓存是否放到redis中 做二级缓存,微服务模式推荐开启
  124. dict-use-redis: false
  125. # 开启redis支持 微服务模式推荐使用redis
  126. is-enable-redis: false
  127. # 启用全局翻译(拦截所有responseBody进行自动翻译),如果关闭需要手动调用翻译方法或者方法加注解,具体看文档
  128. is-enable-global: true
  129. # 启平铺模式(transMap的key平铺到和vo一个级别)
  130. is-enable-tile: true
  131. # 默认为true 如果前期先单体跑,后期可能改为springcloud微服务,可以先设置为false,后期设置为true,设置为false RPC翻译会走SIMPLE的逻辑
  132. is-enable-cloud: false
  133. # 日志配置
  134. logging:
  135. level:
  136. org.eco.vip: @logging.level@
  137. org.springframework: warn
  138. com.zaxxer.hikari.pool.HikariPool: ERROR
  139. com.zaxxer.hikari.HikariDataSource: ERROR
  140. org.mybatis.spring.mapper: error
  141. org.springframework.context.support.PostProcessorRegistrationDelegate: error