简体   繁体   English

更改Spring Cloud Config的路径

[英]Change path for Spring Cloud Config

We are currently running a Spring Cloud Config instance but would like to change the path where the server exposes the configuration. 我们目前正在运行一个Spring Cloud Config实例,但想更改服务器公开配置的路径。

What we have today: 我们今天所拥有的:
http://{server.url}:{server:port}/{app.name}/{app.profile}..

What we would like: 我们想要什么:
http://{server.url}:{server:port}/custom path/{app.name}/{app.profile}..

Is this possible? 这可能吗?

Found the answer in the documentation . 文档中找到了答案。
In the application config file (yml/properties) the property spring.cloud.config.server.prefix needs to be set to the path you want to assign 在应用程序配置文件(yml / properties)中,需要将spring.cloud.config.server.prefix属性设置为您要分配的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM