1.application.yml配置
1 spring: 2 datasource: 3 jdbcUrl: jdbc:mysql://127.0.0.1:3306/jby?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false 4 username: root 5 password: 'f687101570bae7ce4d313c2b4440f4ae' 6 #自动提交 7 auto-commit: true 8 #最小连接 9 minimum-idle: 100 10 #最大连接 11 maximum-pool-size: 200 12 #最大空闲时间 13 idle-timeout: 60000 14 #连接池名 15 pool-name: DatebookHikariCP 16 #最大生命周期 17 max-lifetime: 900000 18 #连接超时时间 19 connection-timeout: 15000 20 #心跳检测 21 connection-test-query: SELECT 'x' FROM DUAL
2. 构建Ums