File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 11# 开发环境配置
22# 数据源配置,请修改为你项目的实际配置
3- spring.datasource.url =jdbc:mysql://localhost:3306/monkey
3+ spring.datasource.url =jdbc:mysql://localhost:3306/monkey?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
44spring.datasource.username =root
55spring.datasource.password =123456
66# # com.mysql.jdbc.Driver
77spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
8+ # 初始化时建立物理连接的个数
9+ spring.datasource.druid.initial-size =15
10+ # 最小连接池数量
11+ spring.datasource.druid.min-idle =10
12+ # 最大连接池数量
13+ spring.datasource.druid.max-active =50
14+ # 获取连接时最大等待时间
15+ spring.datasource.druid.max-wait =60000
16+ # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
17+ spring.datasource.druid.timeBetweenEvictionRunsMillis =60000
18+ # 配置一个连接在池中最小生存的时间,单位是毫秒
19+ spring.datasource.druid.minEvictableIdleTimeMillis =300000
20+ # 配置一个连接在池中最大生存的时间,单位是毫秒
21+ spring.datasource.druid.maxEvictableIdleTimeMillis =900000
22+ # 配置检测连接是否有效
23+ spring.datasource.druid.validationQuery =SELECT 1 FROM DUAL
24+ # 配置监控页面访问登录名称
25+ spring.datasource.druid.stat-view-servlet.login-username =admin
26+ # 配置监控页面访问密码
27+ spring.datasource.druid.stat-view-servlet.login-password =admin
28+ # 是否开启慢sql查询监控
29+ spring.datasource.druid.filter.stat.log-slow-sql =true
30+ # 慢SQL执行时间
31+ spring.datasource.druid.filter.stat.slow-sql-millis =1000
32+
33+
34+
835
936mybatis.config-location = classpath:mybatis/mybatis-config.xml
1037mybatis.mapper-locations = classpath*:mapper/**/*Mapper.xml
You can’t perform that action at this time.
0 commit comments