zbb20190109 SpringBoot项目修改访问端口和访问路径

server:
  port: 9099
  servlet:
    context-path: /parking
 
根据版本不同 或者
 
server:
  port:8088
  context-path:/springboot-demo
 
 

spring-boot配置文件中server.context-path=/XXXXXXX不起作用:

原因是更新后写法变成了server.servlet.context-path=/XXXXXX,这样写即可

原文地址:https://www.cnblogs.com/super-admin/p/10242814.html