版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38959210/article/details/89152729
查看WebMvcAutoConfiguration——>getStaticLocations()
静态资源的默认位置:
"classpath:/METAINF/resources/"
"classpath:/resources/"
"classpath:/static/"
"classpath:/public/"
修改默认的静态资源的位置:
# 指定静态资源的位置
spring.resources.staticlocations=classpath:/static,classpath:/public
欢迎页:
将index.html页面放到任意一个静态资源文件夹中即可
浏览器图标 :
将favicon.ico放到任意一个静态资源文件夹中即可