码迷,mamicode.com
首页 > 编程语言 > 详细

springboot中自定义根路径的配置

时间:2017-12-14 21:01:21      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:server   ext   app   访问   class   ica   默认   text   页面   

Spring boot默认是/ ,这样直接通过http://ip:port/就可以访问到index页面,如果要修改为http://ip:port/path/ 访问的话,那么需要在Application.properties文件中加入server.context-path = /你的path,比如:spring-boot,那么访问地址就是http://ip:port/spring-boot 路径。

server.context-path=/spring-boot

 

springboot中自定义根路径的配置

标签:server   ext   app   访问   class   ica   默认   text   页面   

原文地址:http://www.cnblogs.com/shamo89/p/7832758.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!