springboot配置文件整理

@、server.servlet.context-path

定义: server.context-path= # Context path of the application. 应用的上下文路径,也可以称为项目路径,是构成url地址的一部分。

server.servlet.context-path不配置时,默认为 / ,如:localhost:8080/xx

server.servlet.context-path有配置时,比如 /demo,此时的访问方式为localhost:8080/demo/xx

springboot 2.0前后的配置区别:

1、springboot 2.0之前,配置为 server.context-path

2、springboot 2.0之后,配置为 server.servlet.context-path

发布了297 篇原创文章 · 获赞 181 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/libusi001/article/details/105216371
今日推荐