Springboot 项目中,当我们在 resources
目录下创建了一个 index.html
的页面
出现了 404 错误
需要注意两处
:
pom.xml 文件中导入模板依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
index.html 放入到resources/templates 或者 resources/static 目录下
访问 localhost:8080
即可
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。