Sync docs from master to gh-pages
This commit is contained in:
@@ -422,11 +422,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
</li>
|
||||
<li><a href="#_spring_cloud_config_server">Spring Cloud Config Server</a>
|
||||
<ul class="sectlevel2">
|
||||
<li><a href="#_environment_repository">Environment Repository</a></li>
|
||||
<li><a href="#_embedding_the_config_server">Embedding the Config Server</a></li>
|
||||
<li><a href="#_security">Security</a></li>
|
||||
<li><a href="#_encryption_and_decryption">Encryption and Decryption</a></li>
|
||||
<li><a href="#_key_management">Key Management</a></li>
|
||||
<li><a href="#_creating_a_key_store_for_testing">Creating a Key Store for Testing</a></li>
|
||||
<li><a href="#_embedding_the_config_server">Embedding the Config Server</a></li>
|
||||
<li><a href="#_embedding_the_config_server_2">Embedding the Config Server</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#_spring_cloud_config_client">Spring Cloud Config Client</a>
|
||||
@@ -634,6 +636,53 @@ server is easily embeddable in a Spring Boot application using the
|
||||
<code>@EnableConfigServer</code> annotation.</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_environment_repository">Environment Repository</h3>
|
||||
<div class="paragraph">
|
||||
<p>Where do you want to store the configuration data for the Config
|
||||
Server? The strategy that governs this behaviour is the
|
||||
<code>EnvironmentRepository</code>, serving <code>Environment</code> objects. This
|
||||
<code>Environment</code> is a shallow copy of the domain from the Spring
|
||||
<code>Environment</code> (including <code>propertySources</code> as the main feature). The
|
||||
default implementation of <code>EnvironmentRepository</code> uses a Git backend,
|
||||
which is very convenient for managing upgrades and physical
|
||||
environments, and also for auditing changes. To change the location of
|
||||
the repository you can set the "spring.cloud.config.server.uri"
|
||||
configuration property in the Config Server (e.g. in
|
||||
<code>application.yml</code>). If you set it with a <code>file:</code> prefix it should work
|
||||
from a local repository so you can get started quickly and easily
|
||||
without a server (it doesn’t matter if it’s not bare because the
|
||||
Config Server never makes changes to the "remote" repository). To
|
||||
scale the Config Server up and make it highly available, however, you
|
||||
would need to have all instances of the server pointing to the same
|
||||
repository, so only a shared file system would work.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>There is also a "native" profile in the Config Server that doesn’t use
|
||||
Git, but just loads the config files from the local classpath (or
|
||||
anywhere else you want to point to with
|
||||
"spring.cloud.config.server.locations"). To use the native profile
|
||||
just launch the Config Server with "spring.profiles.active=native". In
|
||||
the native profile the repository only has the "current" set of
|
||||
configuration files, so the "label" specification in the HTTP
|
||||
resources is ignored (i.e. it’s like always pulling from "master" in
|
||||
the Git implementation).</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_embedding_the_config_server">Embedding the Config Server</h3>
|
||||
<div class="paragraph">
|
||||
<p>The Config Server can be embedded in another web application by
|
||||
setting "spring.cloud.config.server.prefix" (default empty), e.g. to
|
||||
"/config". If you do that, then you probably want to bootstrap the app
|
||||
containing the Config Server from the same remote repository from
|
||||
which all the other remote apps get their configuration properties
|
||||
(otherwise it is just a normal Spring Boot application since it won’t
|
||||
have a Config Server to contact when it starts). To do that you just
|
||||
need to make sure that the (optional) property
|
||||
"spring.cloud.config.server.bootstrap" is "true".</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_security">Security</h3>
|
||||
<div class="paragraph">
|
||||
<p>You are free to secure your Config Server in any way that makes sense
|
||||
@@ -820,7 +869,7 @@ your <code>application.yml</code> for the Config Server:</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_embedding_the_config_server">Embedding the Config Server</h3>
|
||||
<h3 id="_embedding_the_config_server_2">Embedding the Config Server</h3>
|
||||
<div class="paragraph">
|
||||
<p>The Config Server runs best as a standalone application, but if you
|
||||
need to you can embed it in another application. Just use the
|
||||
@@ -1253,7 +1302,7 @@ grabbing it in the bootstrap context and injecting one).</p>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2014-11-08 13:15:01 UTC
|
||||
Last updated 2014-11-08 19:30:00 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user