0
当春天启动构建RESTful API,我们可以配置上下文根路径,例如:为什么我需要spring引导restful API的上下文根?
http://customer-api:8080/customer-api/
为什么需要上下文根?我可以只使用:
http://customer-api:8080/
只是想了解。
当春天启动构建RESTful API,我们可以配置上下文根路径,例如:为什么我需要spring引导restful API的上下文根?
http://customer-api:8080/customer-api/
为什么需要上下文根?我可以只使用:
http://customer-api:8080/
只是想了解。
您不需要上下文根。 server.context-path
的弹簧启动默认值为/
。如果您在以不同上下文根目录托管多个应用程序的域下部署应用程序,则只需要上下文根。不过,这是一个相当普遍的情况。
当然你可以使用 – pvpkiran