Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2018-05-02 23:46:00 +00:00
parent 64fd043ba2
commit c906d32065
3 changed files with 15 additions and 15 deletions

View File

@@ -46,9 +46,9 @@ To change the location of the repository, you can set the <code class="literal">
If you set it with a <code class="literal">file:</code> 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 <code class="literal">ssh:</code> protocol for a shared filesystem repository, so that the server can clone it and use a local working copy as a cache.</p><p>This repository implementation maps the <code class="literal">{label}</code> 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 (<code class="literal">/</code>), then the label in the HTTP URL should instead be specified with the special string <code class="literal">$$_$$</code> (to avoid ambiguity with other URL paths).
For example, if the label is <code class="literal">foo/bar</code>, replacing the slash would result in the following label: <code class="literal">foo($$_$$)bar</code>.
The inclusion of the special string <code class="literal">($$_$$)</code> can also be applied to the <code class="literal">{application}</code> parameter.
If the git branch or tag name contains a slash (<code class="literal">/</code>), then the label in the HTTP URL should instead be specified with the special string <code class="literal">(_)</code> (to avoid ambiguity with other URL paths).
For example, if the label is <code class="literal">foo/bar</code>, replacing the slash would result in the following label: <code class="literal">foo(_)bar</code>.
The inclusion of the special string <code class="literal">(_)</code> can also be applied to the <code class="literal">{application}</code> parameter.
If you use a command-line client such as curl, be careful with the brackets in the URL&#8201;&#8212;&#8201;you should
escape them from the shell with single quotes ('').</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_placeholders_in_git_uri" href="#_placeholders_in_git_uri"></a>2.1.1&nbsp;Placeholders in Git URI</h3></div></div></div><p>Spring Cloud Config Server supports a git repository URL with placeholders for the <code class="literal">{application}</code> and <code class="literal">{profile}</code> (and <code class="literal">{label}</code> if you need it, but remember that the label is applied as a git label anyway).
So you can support a &#8220;one repository per application&#8221; policy by using a structure similar to the following:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute">spring</span>:
@@ -57,13 +57,13 @@ So you can support a &#8220;one repository per application&#8221; policy by usin
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> server</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> git</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> uri</span>: https://github.com/myorg/{application<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p>You can also support a &#8220;one repository per profile&#8221; policy by using a similar pattern but with
<code class="literal">{profile}</code>.</p><p>Additionally, using the special string "($$_$$)" within your <code class="literal">{application}</code> parameters can enable support for multiple
<code class="literal">{profile}</code>.</p><p>Additionally, using the special string "(_)" within your <code class="literal">{application}</code> parameters can enable support for multiple
organizations, as shown in the following example:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute">spring</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> cloud</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> config</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> server</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> git</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> uri</span>: https://github.com/{application<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p>where <code class="literal">{application}</code> is provided at request time in the following format: <code class="literal">organization($$_$$)application</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_pattern_matching_and_multiple_repositories" href="#_pattern_matching_and_multiple_repositories"></a>2.1.2&nbsp;Pattern Matching and Multiple Repositories</h3></div></div></div><p>Spring Cloud Config also includes support for more complex requirements with pattern
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> uri</span>: https://github.com/{application<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p>where <code class="literal">{application}</code> is provided at request time in the following format: <code class="literal">organization(_)application</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_pattern_matching_and_multiple_repositories" href="#_pattern_matching_and_multiple_repositories"></a>2.1.2&nbsp;Pattern Matching and Multiple Repositories</h3></div></div></div><p>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 <code class="literal">{application}/{profile}</code> names with wildcards (note that a pattern beginning with a wildcard may need to be quoted), as shown in the following example:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute">spring</span>:
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> cloud</span>: