配置

application.yaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#服务器端口
server:
port: 8080
tomcat:
connection-timeout: 10000


spring:
datasource:
password: root
username: root
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/mysteps?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
druid:
min-idle: 10
max-active: 50
max-idle: 10
initial-size: 1
max-wait: 5000

依赖

pom

1
2
3
4
5
6
7
8
9
10
11
12
13
14
        <dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.3.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.23</version>
</dependency>