# Database access configuration
# Primary data source, the default
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
spring.datasource.password=123456
# The following is the supplementary connection pool, all of the above is applied to the data source
# Initial size, minimum, maximum,
spring.datasource.initialSize=5
spring.datasource.minIdle=5
spring.datasource.maxActive=20
# Obtain time to wait for a connection timeout
spring.datasource.maxWait=60000
# Intervals the frequency of such detection, an idle connection is detected to be closed in milliseconds
spring.datasource.timeBetweenEvictionRunsMillis = 60000
# Configure a minimum survival time connection pool, in milliseconds
spring.datasource.minEvictableIdleTimeMillis = 300000
spring.datasource.validationQuery=SELECT 1 FROM DUAL
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
# Open PSCache, and specifies the size of each connection PSCache
spring.datasource.poolPreparedStatements=true
spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
# Configure monitoring statistics intercepted filters, after removing the monitoring interface sql not statistics, 'wall' for firewall
spring.datasource.filters=stat,wall,log4j
# To open mergeSql function by connectProperties property; slow SQL record
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# Merge multiple DruidDataSource monitoring data