使用不同SpringBoot版本,指定访问项目路径的项目名,使用的配置也不一样
有网友指出
SpringBoot版本
配置
1.x
server.context-path=/demo
2.x
server.servlet.context-path=/demo
以下为本地测试可行代码
pom.xml中使用SpringBoot版本
<version>1.5.9.RELEASE</version>
application.properties文件添加
server.context-path=/demo
pom.xml中使用SpringBoot版本
<version>2.0.2.RELEASE</version>
application.properties文件添加
server.servlet.context-path=/demo