配置参数
https://www.cnblogs.com/Jason-Xiang/p/6586311.html
在pom.xml添加依赖配置
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.2.6</version>
</dependency>
<!--log4j-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
</dependency>
</dependencies>
在application.yml中配置druid数据连接池
spring:
datasource:
username: root
password: 123
# 字符编码 时区
url: jdbc:mysql://localhost:3306/mybatis?useUnicode=true&charterEncoding=UTF-8&serverTimezone=UTC
driver-class-name