【笔记】SpringBoot项目配置前端页面 发表于 2020-09-30 更新于 2026-04-06 阅读次数: 116194285000204101前言SpringBoot项目配置前端页面 添加依赖pom.xml12345678<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId></dependency> 修改配置12345678910# 单体架构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://127.0.0.1:8080/# 前后端分离架构静态页面# spring.mvc.static-path-pattern= 完成