场景
项目搭建专栏:
https://blog.csdn.net/BADAO_LIUMANG_QIZHI/column/info/35688
实现
项目依赖中引入web依赖,则自动依赖文件上传
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
引入thymeleaf依赖,实现上传页面
<!-- springboot整合thymeleaf -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
新建模板upload.html
<!DOCTYPE