一、建项目
根据原项目pom.xml文件看有哪些依赖,然后在建项目时直接选
依赖:Web、Thymeleaf、File、MyBatis、Pagehelper、MySQL、Datasource
在pom文件中加上没有的依赖
<!-- File -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
</dependency>
<!-- Pagehelper -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.5</version>
</dependency>
<!-- Datasource -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.16</version>
</dependency>
每次有maven的项目要修改maven仓库
二、修改配置文件
application.yml
server:
port: 8080
spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/memo?useUnicode=true&characterEncoding=utf-8&