application.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Tomcat
  2. server:
  3. tomcat:
  4. uri-encoding: UTF-8
  5. threads:
  6. max: 1000
  7. min-spare: 30
  8. port: 8081
  9. servlet:
  10. context-path: /api
  11. session:
  12. cookie:
  13. http-only: true
  14. knife4j:
  15. enable: true
  16. basic:
  17. enable: false
  18. username: admin
  19. password: admin
  20. setting:
  21. enableFooter: false
  22. spring:
  23. # 环境 dev|test|prod
  24. profiles:
  25. active: test
  26. messages:
  27. encoding: UTF-8
  28. basename: i18n/messages
  29. # jackson时间格式化
  30. jackson:
  31. time-zone: GMT+8
  32. date-format: yyyy-MM-dd HH:mm:ss
  33. mvc:
  34. pathmatch:
  35. matching-strategy: ANT_PATH_MATCHER
  36. servlet:
  37. multipart:
  38. max-file-size: 100MB
  39. max-request-size: 100MB
  40. enabled: true
  41. data:
  42. redis:
  43. database: 0
  44. host: 127.0.0.1
  45. port: 6379
  46. password: # 密码(默认为空)
  47. timeout: 6000ms # 连接超时时长(毫秒)
  48. lettuce:
  49. pool:
  50. max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
  51. max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
  52. max-idle: 10 # 连接池中的最大空闲连接
  53. min-idle: 5 # 连接池中的最小空闲连接
  54. renren:
  55. redis:
  56. open: true # 是否开启redis缓存 true开启 false关闭
  57. #mybatis
  58. mybatis-plus:
  59. mapper-locations: classpath*:/mapper/**/*.xml
  60. #实体扫描,多个package用逗号或者分号分隔
  61. typeAliasesPackage: com.qnfhq.entity
  62. global-config:
  63. #数据库相关配置
  64. db-config:
  65. #主键类型
  66. id-type: ASSIGN_ID
  67. banner: false
  68. #原生配置
  69. configuration:
  70. map-underscore-to-camel-case: true
  71. cache-enabled: false
  72. call-setters-on-nulls: true
  73. jdbc-type-for-null: 'null'
  74. configuration-properties:
  75. prefix:
  76. blobType: BLOB
  77. boolValue: TRUE
  78. # token配置
  79. token:
  80. # 令牌自定义标识
  81. header: Authorization
  82. # 令牌密钥
  83. secret: aecfp3duvwzqbcpjklmn1r2lhgwt3ghi9xter
  84. # 令牌有效期(默认30分钟)
  85. expireTime: 180
  86. ############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
  87. sa-token:
  88. # token 名称(同时也是 cookie 名称)
  89. token-name: satoken
  90. # token 有效期(单位:秒) 默认30天,-1 代表永久有效
  91. timeout: 2592000
  92. # token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
  93. active-timeout: -1
  94. # 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
  95. is-concurrent: true
  96. # 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token)
  97. is-share: false
  98. # token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
  99. token-style: uuid
  100. # 是否输出操作日志
  101. is-log: true
  102. # 日志等级(trace、debug、info、warn、error、fatal)
  103. log-level: error
  104. # 同一账号最大登录数量,-1代表不限 (只有在 isConcurrent=true,isShare=false 时此配置才有效)
  105. max-login-count: 2
  106. #springdoc:
  107. # api-docs:
  108. # enabled: true # 启用/禁用API文档的访问
  109. # path: /v3/api-docs # 设置API文档的访问路径
  110. # swagger-ui:
  111. # path: /swagger-ui.html # 设置Swagger UI的访问路径
  112. # enabled: true
  113. # default-flat-param-object: false