spring:
|
application:
|
name: cube-system
|
profiles:
|
active: dev
|
servlet:
|
multipart:
|
max-file-size: 10MB
|
max-request-size: 10MB
|
jpa:
|
open-in-view: false
|
aop:
|
proxy-target-class: true
|
# 设置静态文件路径,js,css等
|
mvc:
|
static-path-pattern: /**
|
resources:
|
static-locations: classpath:/static/,classpath:/public/,file:${cube.resources.upload-path},file:${cube.resources.webapp}
|
datasource:
|
dynamic:
|
primary: master
|
strict: false
|
hikari:
|
minIdle: 1
|
# 最佳计算方法:X个线程,每个线程Y个链接,公式(X * (Y - 1) + 1)
|
# 如:13 = 4 * (4 - 1) + 1
|
maxPoolSize: 13
|
dataSourceProperties:
|
cachePrepStmts: true
|
prepStmtCacheSize: 250
|
prepStmtCacheSqlLimit: 2048
|
useServerPrepStmts: true
|
useLocalSessionState: true
|
rewriteBatchedStatements: true
|
cacheResultSetMetadata: true
|
cacheServerConfiguration: true
|
elideSetAutoCommits: true
|
maintainTimeStats: false
|
redis:
|
lettuce:
|
pool:
|
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
|
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
|
max-wait: -1 #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
|
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
|
server:
|
servlet:
|
context-path: /cube
|
tomcat:
|
max-swallow-size: -1
|
error:
|
include-exception: true
|
include-stacktrace: ALWAYS
|
include-message: ALWAYS
|
compression:
|
enabled: true
|
min-response-size: 1024
|
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
management:
|
endpoints:
|
web:
|
exposure:
|
include: '*'
|
cube:
|
# 登录相关配置
|
login:
|
# 登录是否需要验证码
|
captcha:
|
enable: true
|
type: GIF
|
math: false
|
code: abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789
|
# 拦截器相关配置
|
interceptor:
|
configs:
|
SaToken:
|
excludes:
|
- /api-docs/**
|
- /test/**
|
- /demo/**
|
mybatis-plus:
|
plugin:
|
enable-tenant: false
|
enable-optimistic-locker: false
|
swagger:
|
securitySchemes:
|
X-Access-Token:
|
type: APIKEY
|
in: HEADER
|
name: X-Access-Token
|
#mybatis plus 设置
|
mybatis-plus:
|
mapper-locations: classpath*:com/tievd/**/xml/*Mapper.xml
|
type-handlers-package: com.tievd.cube.commons.crypto.handler
|
type-enums-package: com.tievd.cube.commons.base
|
global-config:
|
# 关闭MP3.0自带的banner
|
banner: false
|
db-config:
|
#主键类型
|
id-type: ASSIGN_ID
|
# 默认数据库表下划线命名
|
table-underline: true
|
configuration:
|
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
# 返回类型为Map,显示null对应的字段
|
call-setters-on-nulls: true
|
default-enum-type-handler: org.apache.ibatis.type.EnumTypeHandler
|
# Sa-Token配置
|
sa-token:
|
# token名称 (同时也是cookie名称)
|
token-name: X-Access-Token
|
# token有效期,单位s 默认7天, -1代表永不过期
|
timeout: 604800
|
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
activity-timeout: -1
|
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
is-concurrent: true
|
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
is-share: false
|
# token风格
|
token-style: simple-uuid
|
# 是否输出操作日志
|
is-log: false
|
javamelody:
|
init-parameters:
|
log: true
|
springdoc:
|
api-docs:
|
path: /api-docs
|