Sync docs from master to gh-pages
This commit is contained in:
@@ -324,7 +324,7 @@ is the same as <code class="literal">file:/tmp/config,file:/tmp/config/{label}</
|
||||
disabled by setting <code class="literal">spring.cloud.config.server.native.addLabelLocations=false</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_vault_backend" href="#_vault_backend"></a>2.1.4 Vault Backend</h3></div></div></div><p>Spring Cloud Config Server also supports <a class="link" href="https://www.vaultproject.io" target="_top">Vault</a> as a backend.</p><div class="sidebar"><div class="titlepage"></div><p>Vault is a tool for securely accessing secrets. A secret is anything
|
||||
that you want to tightly control access to, such as API keys, passwords,
|
||||
certificates, and more. Vault provides a unified interface to any secret,
|
||||
while providing tight access control and recording a detailed audit log.</p></div><p>For more information on Vault see the <a class="link" href="https://www.vaultproject.io/intro/index.html" target="_top">Vault quickstart guide</a>.</p><p>To enable the config server to use a Vault backend you must run your config server
|
||||
while providing tight access control and recording a detailed audit log.</p></div><p>For more information on Vault see the <a class="link" href="https://www.vaultproject.io/intro/index.html" target="_top">Vault quickstart guide</a>.</p><p>To enable the config server to use a Vault backend you can run your config server
|
||||
with the <code class="literal">vault</code> profile. For example in your config server’s <code class="literal">application.properties</code>
|
||||
you can add <code class="literal">spring.profiles.active=vault</code>.</p><p>By default the config server will assume your Vault server is running at
|
||||
<code class="literal"><a class="link" href="http://127.0.0.1:8200" target="_top">http://127.0.0.1:8200</a></code>. It also will assume that the name of backend
|
||||
@@ -381,8 +381,22 @@ resources in the default search locations are removed because they are
|
||||
part of the server.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_vault_server" href="#_vault_server"></a>Vault Server</h4></div></div></div><p>When using Vault as a backend you can share configuration with
|
||||
all applications by placing configuration in
|
||||
<code class="literal">secret/application</code>. For example, if you run this Vault command</p><pre class="programlisting">$ vault write secret/application foo=bar baz=bam</pre><p>All applications using the config server will have the properties
|
||||
<code class="literal">foo</code> and <code class="literal">baz</code> available to them.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_composite_environment_repositories" href="#_composite_environment_repositories"></a>2.1.6 Composite Environment Repositories</h3></div></div></div><p>In some scenarios you may wish to pull configuration data from multiple
|
||||
environment repositories. To do this just enable
|
||||
<code class="literal">foo</code> and <code class="literal">baz</code> available to them.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_jdbc_backend" href="#_jdbc_backend"></a>2.1.6 JDBC Backend</h3></div></div></div><p>Spring Cloud Config Server supports JDBC (relation database) as a
|
||||
backend for configuration properties. You can enable this feature by
|
||||
adding <code class="literal">spring-jdbc</code> to the classpath, and using the "jdbc" profile,
|
||||
or by adding a bean of type <code class="literal">JdbcEnvironmentRepository</code>. Spring Boot
|
||||
will configure a data source if you include the right dependencies on
|
||||
the classpath (see the user guide for more details on that).</p><p>The database needs to have a table called "PROPERTIES" with columns
|
||||
"APPLICATION", "PROFILE", "LABEL" (with the usual <code class="literal">Environment</code>
|
||||
meaning), plus "KEY" and "VALUE" for the key and value pairs in
|
||||
<code class="literal">Properties</code> style. All fields are of type String in Java, so you can
|
||||
make them <code class="literal">VARCHAR</code> of whatever length you need. Property values
|
||||
behave in the same way as they would if they came from Spring Boot
|
||||
properties files named <code class="literal">{application}-{profile}.properties</code>, including
|
||||
all the encryption and decryption, which will be applied as
|
||||
post-processing steps (i.e. not in the repository implementation
|
||||
directly).</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_composite_environment_repositories" href="#_composite_environment_repositories"></a>2.1.7 Composite Environment Repositories</h3></div></div></div><p>In some scenarios you may wish to pull configuration data from multiple
|
||||
environment repositories. To do this you can just enable
|
||||
multiple profiles in your config server’s application properties or YAML file.
|
||||
If, for example, you want to pull configuration data from a Git repository
|
||||
as well as a SVN repository you would set the following properties for your
|
||||
@@ -412,7 +426,7 @@ must implement the <code class="literal">EnvironmentRepository</code> interface.
|
||||
the priority of you custom <code class="literal">EnvironmentRepository</code> within the composite
|
||||
environment you should also implement the <code class="literal">Ordered</code> interface and override the
|
||||
<code class="literal">getOrdered</code> method. If you do not implement the <code class="literal">Ordered</code> interface then your
|
||||
<code class="literal">EnvironmentRepository</code> will be given the lowest priority.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_property_overrides" href="#_property_overrides"></a>2.1.7 Property Overrides</h3></div></div></div><p>The Config Server has an "overrides" feature that allows the operator
|
||||
<code class="literal">EnvironmentRepository</code> will be given the lowest priority.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_property_overrides" href="#_property_overrides"></a>2.1.8 Property Overrides</h3></div></div></div><p>The Config Server has an "overrides" feature that allows the operator
|
||||
to provide configuration properties to all applications that cannot be
|
||||
accidentally changed by the application using the normal Spring Boot
|
||||
hooks. To declare overrides just add a map of name-value pairs to
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -659,7 +659,7 @@ certificates, and more. Vault provides a unified interface to any secret,
|
||||
while providing tight access control and recording a detailed audit log.</simpara>
|
||||
</sidebar>
|
||||
<simpara>For more information on Vault see the <link xl:href="https://www.vaultproject.io/intro/index.html">Vault quickstart guide</link>.</simpara>
|
||||
<simpara>To enable the config server to use a Vault backend you must run your config server
|
||||
<simpara>To enable the config server to use a Vault backend you can run your config server
|
||||
with the <literal>vault</literal> profile. For example in your config server’s <literal>application.properties</literal>
|
||||
you can add <literal>spring.profiles.active=vault</literal>.</simpara>
|
||||
<simpara>By default the config server will assume your Vault server is running at
|
||||
@@ -788,10 +788,29 @@ all applications by placing configuration in
|
||||
<literal>foo</literal> and <literal>baz</literal> available to them.</simpara>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="_jdbc_backend">
|
||||
<title>JDBC Backend</title>
|
||||
<simpara>Spring Cloud Config Server supports JDBC (relation database) as a
|
||||
backend for configuration properties. You can enable this feature by
|
||||
adding <literal>spring-jdbc</literal> to the classpath, and using the "jdbc" profile,
|
||||
or by adding a bean of type <literal>JdbcEnvironmentRepository</literal>. Spring Boot
|
||||
will configure a data source if you include the right dependencies on
|
||||
the classpath (see the user guide for more details on that).</simpara>
|
||||
<simpara>The database needs to have a table called "PROPERTIES" with columns
|
||||
"APPLICATION", "PROFILE", "LABEL" (with the usual <literal>Environment</literal>
|
||||
meaning), plus "KEY" and "VALUE" for the key and value pairs in
|
||||
<literal>Properties</literal> style. All fields are of type String in Java, so you can
|
||||
make them <literal>VARCHAR</literal> of whatever length you need. Property values
|
||||
behave in the same way as they would if they came from Spring Boot
|
||||
properties files named <literal>{application}-{profile}.properties</literal>, including
|
||||
all the encryption and decryption, which will be applied as
|
||||
post-processing steps (i.e. not in the repository implementation
|
||||
directly).</simpara>
|
||||
</section>
|
||||
<section xml:id="_composite_environment_repositories">
|
||||
<title>Composite Environment Repositories</title>
|
||||
<simpara>In some scenarios you may wish to pull configuration data from multiple
|
||||
environment repositories. To do this just enable
|
||||
environment repositories. To do this you can just enable
|
||||
multiple profiles in your config server’s application properties or YAML file.
|
||||
If, for example, you want to pull configuration data from a Git repository
|
||||
as well as a SVN repository you would set the following properties for your
|
||||
|
||||
Reference in New Issue
Block a user