From c906d320659c6eae3f4cb76f96495a8c28ba84a9 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 2 May 2018 23:46:00 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi__spring_cloud_config_server.html | 10 +++++----- single/spring-cloud-config.html | 10 +++++----- spring-cloud-config.xml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/multi/multi__spring_cloud_config_server.html b/multi/multi__spring_cloud_config_server.html index 8c575522..833b32b8 100644 --- a/multi/multi__spring_cloud_config_server.html +++ b/multi/multi__spring_cloud_config_server.html @@ -46,9 +46,9 @@ To change the location of the repository, you can set the If you set it with a file: prefix, it should work from a local repository so that you can get started quickly and easily without a server. However, in that case, the server operates directly on the local repository without cloning it (it does not matter if it is not bare because the Config Server never makes changes to the "remote" repository). To scale the Config Server up and make it highly available, you need to have all instances of the server pointing to the same repository, so only a shared file system would work. Even in that case, it is better to use the ssh: protocol for a shared filesystem repository, so that the server can clone it and use a local 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). -If the git branch or tag name contains a slash (/), then the label in the HTTP URL should instead be specified with the special string $$_$$ (to avoid ambiguity with other URL paths). -For example, if the label is foo/bar, replacing the slash would result in the following label: foo($$_$$)bar. -The inclusion of the special string ($$_$$) can also be applied to the {application} parameter. +If the git branch or tag name contains a slash (/), then the label in the HTTP URL should instead be specified with the special string (_) (to avoid ambiguity with other URL paths). +For example, if the label is foo/bar, replacing the slash would result in the following label: foo(_)bar. +The inclusion of the special string (_) can also be applied to the {application} parameter. If you use a command-line client such as curl, be careful with the brackets in the URL — you should escape them from the shell with single quotes ('').

2.1.1 Placeholders in Git URI

Spring Cloud Config Server supports a git repository URL with placeholders for the {application} and {profile} (and {label} if you need it, but remember that the label is applied as a git label anyway). So you can support a “one repository per application” policy by using a structure similar to the following:

spring:
@@ -57,13 +57,13 @@ So you can support a “one repository per application” policy by usin
       server:
         git:
           uri: https://github.com/myorg/{application}

You can also support a “one repository per profile” policy by using a similar pattern but with -{profile}.

Additionally, using the special string "($$_$$)" within your {application} parameters can enable support for multiple +{profile}.

Additionally, using the special string "(_)" within your {application} parameters can enable support for multiple organizations, as shown in the following example:

spring:
   cloud:
     config:
       server:
         git:
-          uri: https://github.com/{application}

where {application} is provided at request time in the following format: organization($$_$$)application.

2.1.2 Pattern Matching and Multiple Repositories

Spring Cloud Config also includes support for more complex requirements with pattern + uri: https://github.com/{application}

where {application} is provided at request time in the following format: organization(_)application.

2.1.2 Pattern Matching and Multiple Repositories

Spring Cloud Config also includes support for more complex requirements with pattern matching on the application and profile name. The pattern format is a comma-separated list of {application}/{profile} names with wildcards (note that a pattern beginning with a wildcard may need to be quoted), as shown in the following example:

spring:
   cloud:
diff --git a/single/spring-cloud-config.html b/single/spring-cloud-config.html
index 708a708d..36db7bbc 100644
--- a/single/spring-cloud-config.html
+++ b/single/spring-cloud-config.html
@@ -130,9 +130,9 @@ To change the location of the repository, you can set the 
 If you set it with a file: prefix, it should work from a local repository so that you can get started quickly and easily without a server. However, in that case, the server operates directly on the local repository without cloning it (it does not matter if it is not bare because the Config Server never makes changes to the "remote" repository).
 To scale the Config Server up and make it highly available, you need to have all instances of the server pointing to the same repository, so only a shared file system would work.
 Even in that case, it is better to use the ssh: protocol for a shared filesystem repository, so that the server can clone it and use a local 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). -If the git branch or tag name contains a slash (/), then the label in the HTTP URL should instead be specified with the special string $$_$$ (to avoid ambiguity with other URL paths). -For example, if the label is foo/bar, replacing the slash would result in the following label: foo($$_$$)bar. -The inclusion of the special string ($$_$$) can also be applied to the {application} parameter. +If the git branch or tag name contains a slash (/), then the label in the HTTP URL should instead be specified with the special string (_) (to avoid ambiguity with other URL paths). +For example, if the label is foo/bar, replacing the slash would result in the following label: foo(_)bar. +The inclusion of the special string (_) can also be applied to the {application} parameter. If you use a command-line client such as curl, be careful with the brackets in the URL — you should escape them from the shell with single quotes ('').

2.1.1 Placeholders in Git URI

Spring Cloud Config Server supports a git repository URL with placeholders for the {application} and {profile} (and {label} if you need it, but remember that the label is applied as a git label anyway). So you can support a “one repository per application” policy by using a structure similar to the following:

spring:
@@ -141,13 +141,13 @@ So you can support a “one repository per application” policy by usin
       server:
         git:
           uri: https://github.com/myorg/{application}

You can also support a “one repository per profile” policy by using a similar pattern but with -{profile}.

Additionally, using the special string "($$_$$)" within your {application} parameters can enable support for multiple +{profile}.

Additionally, using the special string "(_)" within your {application} parameters can enable support for multiple organizations, as shown in the following example:

spring:
   cloud:
     config:
       server:
         git:
-          uri: https://github.com/{application}

where {application} is provided at request time in the following format: organization($$_$$)application.

2.1.2 Pattern Matching and Multiple Repositories

Spring Cloud Config also includes support for more complex requirements with pattern + uri: https://github.com/{application}

where {application} is provided at request time in the following format: organization(_)application.

2.1.2 Pattern Matching and Multiple Repositories

Spring Cloud Config also includes support for more complex requirements with pattern matching on the application and profile name. The pattern format is a comma-separated list of {application}/{profile} names with wildcards (note that a pattern beginning with a wildcard may need to be quoted), as shown in the following example:

spring:
   cloud:
diff --git a/spring-cloud-config.xml b/spring-cloud-config.xml
index 0065eb27..2bb8bb6e 100644
--- a/spring-cloud-config.xml
+++ b/spring-cloud-config.xml
@@ -224,9 +224,9 @@ If you set it with a file: prefix, it should work from a loca
 To scale the Config Server up and make it highly available, you need to have all instances of the server pointing to the same repository, so only a shared file system would work.
 Even in that case, it is better to use the ssh: protocol for a shared filesystem repository, so that the server can clone it and use a local 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).
-If the git branch or tag name contains a slash (/), then the label in the HTTP URL should instead be specified with the special string $$_$$ (to avoid ambiguity with other URL paths).
-For example, if the label is foo/bar, replacing the slash would result in the following label: foo($$_$$)bar.
-The inclusion of the special string ($$_$$) can also be applied to the {application} parameter.
+If the git branch or tag name contains a slash (/), then the label in the HTTP URL should instead be specified with the special string (_) (to avoid ambiguity with other URL paths).
+For example, if the label is foo/bar, replacing the slash would result in the following label: foo(_)bar.
+The inclusion of the special string (_) can also be applied to the {application} parameter.
 If you use a command-line client such as curl, be careful with the brackets in the URL — you should
 escape them from the shell with single quotes ('').
 
@@ -241,7 +241,7 @@ So you can support a “one repository per application” policy by usin uri: https://github.com/myorg/{application} You can also support a “one repository per profile” policy by using a similar pattern but with {profile}. -Additionally, using the special string "($$_$$)" within your {application} parameters can enable support for multiple +Additionally, using the special string "(_)" within your {application} parameters can enable support for multiple organizations, as shown in the following example: spring: cloud: @@ -249,7 +249,7 @@ organizations, as shown in the following example: server: git: uri: https://github.com/{application} -where {application} is provided at request time in the following format: organization($$_$$)application. +where {application} is provided at request time in the following format: organization(_)application.
Pattern Matching and Multiple Repositories