SpringBoot配置项目路径(context-path)方式

 

spring 1.x 版本及以前版本

  在 application.properties 中配置

server.context-path=/test

 

spring 2.x 版本及以后版本

  在 application.properties 中配置

server.servlet.context-path=/test

 

posted @ 2022-12-02 18:47  蜗牛学编程  阅读(694)  评论(0编辑  收藏  举报