首先对于spring boot 1.0和2.0 是有区别的
spring 2.x
erver:
servlet:
context-path: /xxx
port: 8080
spring 1.x
server:
contextPath: /xxx
port: 8080
sping 2.x
--server.servlet.context-path=/xxx
//或者通过 -Dserver.contextPath
-Dserver.servlet.context-path=/xxx
spring 1.x
--server.contextPath==/xxx
//或者通过 -Dserver.contextPath
-Dserver.contextPath=/xxx
因篇幅问题不能全部显示,请点此查看更多更全内容