當前位置:
首頁 >
SpringBoot欢迎页支持——index.xml
發(fā)布時間:2024/3/26
42
豆豆
生活随笔
收集整理的這篇文章主要介紹了
SpringBoot欢迎页支持——index.xml
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
SpringBoot默認支持訪問根路徑(localhost:8080/)跳轉(zhuǎn)到歡迎頁!
注意index.htm放置位置:/static (or /public or /resources or /META-INF/resources
訪問地址:localhost:8080/
但需要注意
- 可以配置靜態(tài)資源路徑
- 但是不可以配置靜態(tài)資源的訪問前綴。否則導致 index.html不能被默認訪問
當配置了靜態(tài)資源路徑
spring:web:resources:static-locations: [classpath:/song/]則需要把index.xml放入song文件夾下或/META-INF/resources路徑下。
當配置了靜態(tài)資源的訪問前綴,訪問localhost:8080/不會進入歡迎頁。
總結(jié)
以上是生活随笔為你收集整理的SpringBoot欢迎页支持——index.xml的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: RIP协议与OSPF协议
- 下一篇: 基于Tomcat环境下运行JSP文件(基