Springboot中添加contextPath

spring boot默認是/ ,這樣直接通過http://ip:port/就可以訪問到index頁面,如果要修改爲http://ip:port/path/ 訪問的話,那麼需要在application.properties文件中加入server.context-path= /你的path,比如:spring-boot,那麼訪問地址就是http://ip:port/spring-boot路徑。 pr
相關文章
相關標籤/搜索