把静态文件放置在如下目录:
1.
classpath:/META-INF/resources/index.html
2.classpath:/resources/index.html
3.classpath:/static/index.html
4.classpath:/public/index.html
当我们访问应用根目录http://localhost:8080/时,会直接映射。
公众号ID:longjiazuoA

未经允许不得转载:人生设计师 » Spring Boot的Web配置(六):静态首页的支持