Fix multi-git samples in docs

This commit is contained in:
Dave Syer
2015-02-20 16:20:43 +00:00
parent 33bfea2814
commit fc4865964b
3 changed files with 44 additions and 27 deletions

View File

@@ -50,7 +50,9 @@ The default strategy for locating property sources is to clone a git
repository (at "spring.cloud.config.server.git.uri") and use it to
initialize a mini `SpringApplication`. The mini-application's
`Environment` is used to enumerate property sources and publish them
via a JSON endpoint. The service has resources in the form:
via a JSON endpoint.
The HTTP service has resources in the form:
----
/{application}/{profile}[/{label}]
@@ -64,10 +66,35 @@ where the "application" is injected as the "spring.config.name" in the
`SpringApplication` (i.e. 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".) The YAML and properties forms are coalesced into a single
"master".)
The YAML and properties forms are coalesced into a single
map, even if the origin of the values (reflected in the
"propertySources" of the "standard" form) has multiple sources.
Spring Cloud Config Server also supports multiple git repositories:
----
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
repos:
- patterns: *pattern
uri: https://github.com/pattern1/config-repo
- patterns: pattern*,*pattern1*
uri: https://github.com/pattern2/config-repo
- patterns: local*
uri: file:/home/configsvc/config-repo
----
In the above example, if {application} does not match to any of the patterns
under "spring.cloud.config.server.git.repos", it will use the default uri
defined under "spring.cloud.config.server.git.uri". Acceptable pattern
format is "*xxx", "xxx*", or "*xxx*".
=== Client Side Usage
To use these features in an application, just build it as a Spring

View File

@@ -43,7 +43,8 @@ The YAML and properties forms are coalesced into a single
map, even if the origin of the values (reflected in the
"propertySources" of the "standard" form) has multiple sources.
Spring Cloud Config Server also supports multiple git repositories:
Spring Cloud Config Server pulls configuration for remote clients
from a git repository (which must be provided):
----
spring:
@@ -52,20 +53,8 @@ spring:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
repos:
- patterns: *pattern
uri: https://github.com/pattern1/config-repo
- patterns: pattern*,*pattern1*
uri: https://github.com/pattern2/config-repo
- patterns: local*
uri: file:/home/configsvc/config-repo
----
In the above example, if {application} does not match to any of the patterns
under "spring.cloud.config.server.git.repos", it will use the default uri
defined under "spring.cloud.config.server.git.uri". Acceptable pattern
format is "*xxx", "xxx*", or "*xxx*".
=== Client Side Usage
To use these features in an application, just build it as a Spring

View File

@@ -85,23 +85,24 @@ working copy as a cache.
This repository implementation maps the `{label}` parameter of the
HTTP resource to a git label (commit id, branch name or tag).
Spring Cloud Config Server also supports multiple git repositories:
Spring Cloud Config Server supports a single or multiple git
repositories:
----
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
repos:
simple: https://github.com/pattern1/config-repo
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
repos:
simple: https://github.com/pattern1/config-repo
special:
pattern: pattern*,*pattern1*
uri: https://github.com/pattern2/config-repo
local:
uri: https://github.com/pattern2/config-repo
local:
pattern: local*
uri: file:/home/configsvc/config-repo
uri: file:/home/configsvc/config-repo
----
In the above example, if {application} does not match to any of the
@@ -119,9 +120,9 @@ e.g.
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
username: trolley
password: strongpassword
----