# Note: Since dinky version 1.1.0, Flyway has been integrated, so h2 defaults to memory mode and no longer uses file mode (persistence).
# File mode can cause Flyway to fail to execute duplicate column addition operations correctly
# as h2 does not support stored procedures and cannot determine the existence of columns through stored procedures. Therefore, please do not use file mode
# The h2 database is used by default. If you need to use other databases, please set the configuration active to: mysql, currently supports [mysql, pgsql, h2]
# If you use mysql database, please configure mysql database connection information in application-mysql.yml
# If you use pgsql database, please configure pgsql database connection information in application-pgsql.yml
# If you use the h2 database, please configure the h2 database connection information in application-h2.yml,
# note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution
active:${DB_ACTIVE:h2}#[h2,mysql,pgsql]
include:
-jmx
-flyway
lifecycle:
timeout-per-shutdown-phase:30s
# mvc config
mvc:
pathmatch:
# Path matching strategy, default ant_path_matcher, support ant_path_matcher and path_pattern_parser
matching-strategy:ant_path_matcher
format:
date:yyyy-MM-dd HH:mm:ss# date format
time:HH:mm:ss# time format
date-time:yyyy-MM-dd HH:mm:ss# date-time format
# json format global configuration
jackson:
time-zone:GMT+8# Time zone, default is GMT+8
date-format:yyyy-MM-dd HH:mm:ss# Date format, the default is yyyy-MM-dd HH:mm:ss
# circular references allowed
main:
allow-circular-references:true
# file upload config of servlet, the default is 500MB
servlet:
multipart:
enabled:true
max-file-size:524288000
max-request-size:524288000
# 1. By default, memory cache metadata information is used,
# 2. DINKY supports Redis caching. If necessary, please change simple to Redis and open the Redis connection configuration below
# 3. Sub configuration items can be opened or customized as needed
cache:
type:simple
# If the type is configured as Redis, this item can be configured as needed
# redis:
# Do you want to cache empty values? Just save by default
# Note: Redis related configurations in DINKY can be used to cache meta-data information (memory caching is used by default) and cache session information of SA TOKEN (dependency needs to be added,please refer to the official documentation of SA TOKEN for Redis caching configuration instructions)
## 1. If you need to use Redis to cache metadata information, please configure cache. Type to Redis and then configure the following configuration items
## 2. If you need to use Redis to cache SA Token session information, please follow the instructions in the official SA Token documentation to configure it
# Note: Please pay attention to the indentation after opening comments, otherwise it may cause configuration file parsing errors. Note that when both 1 and 2 are used simultaneously, only the same Redis database can be supported
# redis:
# host: localhost
# port: 6379
# username:
# password:
# Redis database number
# database: 10
# jedis:
# pool:
# The maximum number of connections in the connection pool (use a negative value to indicate no limit)
# max-active: 50
# The maximum blocking waiting time of the connection pool (use a negative value to indicate no limit)
# max-wait: 3000
# The maximum number of idle connections in the connection pool
# max-idle: 20
# The minimum number of idle connections in the connection pool
# The validity period of the token, the unit is 10 hours by default, -1 means it will never expire
timeout:36000
# The temporary validity period of the token (the token will be considered as expired if there is no operation within the specified time)
# unit: second , if you do not need to set a temporary token, you can set it to -1
active-timeout:-1
# Whether to allow the same account to log in concurrently (when true, allow login together, when false, new login squeezes out old login)
is-concurrent:false
# When multiple people log in to the same account, whether to share a token (if true, all logins share a token, and if false, create a new token for each login)