Merge pull request #1817 from wind57/fix-1816

Add api examples
This commit is contained in:
Ryan Baxter
2021-03-08 15:08:27 -05:00
committed by GitHub

View File

@@ -50,6 +50,17 @@ The HTTP service has resources in the following form:
/{label}/{application}-{profile}.properties
----
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.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`.)
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: