启动swagger
- 在pom.xml中添加如下依赖:
- io.springfox springfox-swagger2 2.9.2
- io.springfox springfox-swagger-ui 2.9.2
- 在Application中添加@EnableSwagger2注解,启动swagger
- 连接数据库
- spring:
datasource:
name: mysql
url: jdbc:mysql://localhost:3306/todo_demo?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false&autoReconnect=true
driverClassName: com.mysql.cj.jdbc.Driver
userName: ****
password: ********
servlet:
multipart:
max-file-size: 20MB
max-request-size: 20MB
server:
port: 8082
- spring:
- 启动完成