From ac23ec2fc5cc80d5117e352fa49b62c7c56fe821 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:17:07 -0400 Subject: [PATCH] Update documentation to support multiple labels --- docs/modules/ROOT/pages/client.adoc | 1 - docs/modules/ROOT/pages/quickstart.adoc | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/client.adoc b/docs/modules/ROOT/pages/client.adoc index dc9ebb0f..bac46d07 100644 --- a/docs/modules/ROOT/pages/client.adoc +++ b/docs/modules/ROOT/pages/client.adoc @@ -130,7 +130,6 @@ You can override all of them by setting `spring.cloud.config.\*` (where `*` is ` The `label` is useful for rolling back to previous versions of configuration. With the default Config Server implementation, it can be a git label, branch name, or commit ID. Label can also be provided as a comma-separated list. -In that case, the items in the list are tried one by one until one succeeds. This behavior can be useful when working on a feature branch. For instance, you might want to align the config label with your branch but make it optional (in that case, use `spring.cloud.config.label=myfeature,develop`). diff --git a/docs/modules/ROOT/pages/quickstart.adoc b/docs/modules/ROOT/pages/quickstart.adoc index c728f0ff..6c77778f 100644 --- a/docs/modules/ROOT/pages/quickstart.adoc +++ b/docs/modules/ROOT/pages/quickstart.adoc @@ -58,13 +58,16 @@ For example: ---- curl localhost:8888/foo/development curl localhost:8888/foo/development/master -curl localhost:8888/foo/development,db/master +curl localhost:8888/foo/development,db/master,dev curl localhost:8888/foo-development.yml curl localhost:8888/foo-db.properties curl localhost:8888/master/foo-db.properties ---- -where `application` is injected as the `spring.config.name` in the `SpringApplication` (what is normally `application` in a regular Spring Boot app), `profile` is an active profile (or comma-separated list of properties), and `label` is an optional git label (defaults to `master`.) +where `application` is injected as the `spring.config.name` in the `SpringApplication` (what is normally `application` in a regular Spring Boot app), `profile` is an active profile (or comma-separated list of properties), and `label` is an optional git label (defaults to `main`.) + +Just like with profiles, you can provide a comma separated list of labels and if the environment repositories used by the config server +supports labels it will return all property sources for those labels. Spring Cloud Config Server pulls configuration for remote clients from various sources. The following example gets configuration from a git repository (which must be provided), as shown in the following example: