springboot中自定義根路徑的配置

Spring boot默認是/ ,這樣直接經過http://ip:port/就能夠訪問到index頁面,若是要修改成http://ip:port/path/ 訪問的話,那麼須要在Application.properties文件中加入server.context-path = /你的path,好比:spring-boot,那麼訪問地址就是http://ip:port/spring-boot 路徑。s
相關文章
相關標籤/搜索