mybatis的 yml 常用配置
spring
datasource
#数据源的基本配置
username root
password root
driver-class-name com.mysql.cj.jdbc.Driver
url jdbc mysql //localhost 3306/test?useUnicode=true&characterEncoding=utf-8&serverTimezone = UTC&useSSL=false
type com.alibaba.druid.pool.DruidDataSource
#数据源的其他配置
initialSize5
minIdle5
maxActive20
maxWait60000
timeBetweenEvictionRunsMillis60000
minEvictableIdleTimeMillis300000
validationQuery SELECT 1 FROM DUAL
testWhileIdletrue
testOnBorrowfalse
testOnReturnfalse
poolPreparedStatementstrue
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
filters stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize20
useGlobalDataSourceStattrue
connectionProperties druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
#mybatis的配置
```