微服务访问地址配置

来源:互联网 发布:ai汉化包for mac 编辑:程序博客网 时间:2024/06/05 20:39

spring boot默认是/,这样直接通过http://ip:port/就可以访问到index页面,如果要修改为http://ip:port/path/访问的话,

那么需要在Application.properties文件中加入server.context-path = /你的path,比如:spring-boot,那么访问地址就是http://ip:port/spring-boot 路径。

相当于在springmvc中的前端控制器配置的过滤url.

server.context-path=/spring-boot
参照网址:
http://blog.csdn.net/zyz15234081400/article/details/72471304
http://412887952-qq-com.iteye.com/blog/2291578
原创粉丝点击