【笔记】SpringBoot项目配置前端页面

前言

SpringBoot项目配置前端页面,需要引入thymeleafspring web依赖

配置

1
2
3
4
5
6
7
8
9
10
# 单体架构
spring.thymeleaf.prefix=classpath:/templates/

# 前后端分离架构动态页面
# spring.thymeleaf.prefix=file:/src/main/resources/templates/
# spring.thymeleaf.prefix=file:///src/main/resources/templates/
# spring.thymeleaf.prefix=http://localhost/

# 前后端分离架构静态页面
# spring.mvc.static-path-pattern=

完成