更改 Spring Cloud Config 的路径
Change path for Spring Cloud Config
我们目前 运行 是一个 Spring Cloud Config 实例,但想更改服务器公开配置的路径。
我们今天有什么:
http://{server.url}:{server:port}/{app.name}/{app.profile}..
我们想要什么:
http://{server.url}:{server:port}/custom path/{app.name}/{app.profile}..
这可能吗?
在 documentation 中找到了答案。
在应用程序配置文件 (yml/properties) 中,属性 spring.cloud.config.server.prefix
需要设置为您要分配的路径
我们目前 运行 是一个 Spring Cloud Config 实例,但想更改服务器公开配置的路径。
我们今天有什么:
http://{server.url}:{server:port}/{app.name}/{app.profile}..
我们想要什么:
http://{server.url}:{server:port}/custom path/{app.name}/{app.profile}..
这可能吗?
在 documentation 中找到了答案。
在应用程序配置文件 (yml/properties) 中,属性 spring.cloud.config.server.prefix
需要设置为您要分配的路径