添加thmeleaf起步依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
修改配置文件:
spring:
thymeleaf:
prefix: classpath:/templates/
添加controller:
@Controller
public class FdfsController {
@RequestMapping("file")
public String file(){
return "/fileUploade";
}
}
静态文件放置在resources/templates文件夹下
访问使用controller的入口访问