diff --git a/spring-cloud-config.html b/spring-cloud-config.html index e1e0c2c0..4e162cb8 100644 --- a/spring-cloud-config.html +++ b/spring-cloud-config.html @@ -451,9 +451,6 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system. With the Config Server you have a central place to manage external properties for applications across all environments. The concepts on both client and server map identically to the Spring Environment and PropertySource abstractions, so they fit very well with Spring applications, but can be used with any application running in any language. As an application moves through the deployment pipeline from dev to test and into production you can manage the configuration between those environments and be certain that applications have everything they need to run when they migrate. The default implementation of the server storage backend uses git so it easily supports labelled versions of configuration environments, as well as being accessible to a wide range of tooling for managing the content. It is easy to add alternative implementations and plug them in with Spring configuration.

-
-

https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing-docs.adoc

-
@@ -663,7 +660,78 @@ the config server URL.

The Server provides an HTTP, resource-based API for external configuration (name-value pairs, or equivalent YAML content). The server is easily embeddable in a Spring Boot application using the -@EnableConfigServer annotation.

+@EnableConfigServer annotation. So this app is a config server:

+
+
+
ConfigServer.java
+
+
@SpringBootApplication
+@EnableConfigServer
+public class ConfigServer {
+  public static void main(String[] args) {
+    SpringApplication.run(ConfigServer.class, args);
+  }
+}
+
+
+
+

Like all Spring Boot apps it runs on port 8080 by default, but you +can switch it to the conventional port 8888 in various ways. The +easiest, which also sets a default configuration repository, +is by launching it with spring.config.name=configserver (there +is a configserver.yml in the Config Server jar). Another is +to use your own application.properties, e.g.

+
+
+
application.properties
+
+
server.port: 8888
+spring.cloud.config.server.git.uri: file://${HOME}/config-repo
+
+
+
+

where ${HOME}/config-repo is a git repository containing +YAML and properties files.

+
+
+ + + + + +
+
Tip
+
+
+

Here’s a recipe for creating the git repository in the example +above:

+
+
+
+
$ cd $HOME
+$ mkdir config-repo
+$ cd config-repo
+$ git init .
+$ echo info.foo: bar > application.properties
+$ git add -A .
+$ git commit -m "Add application.properties"
+
+
+
+
+
+ + + + + +
+
Warning
+
+using the local filesystem for your git repository is +intended for testing only. Use a server to host your +configuration repositories in production. +

Environment Repository

@@ -1045,9 +1113,9 @@ mysecret
-

Take the encypted value and add the {cipher} prefix before you put +

Take the encrypted value and add the {cipher} prefix before you put it in the YAML or properties file, and before you commit and push it -to a remote, potentially insecure store. The /encypt and /decrypt +to a remote, potentially insecure store. The /encrypt and /decrypt endpoints also both accept paths of the form /*/{name}/{profiles} which can be used to control cryptography per application (name) and profile when clients call into the main Environment resource.

@@ -1080,7 +1148,7 @@ mysecret
-

To use a key in a file (e.g. an RSA public key for encyption) prepend +

To use a key in a file (e.g. an RSA public key for encryption) prepend the key value with "@" and provide the file path, e.g.

@@ -1411,7 +1479,7 @@ grabbing it in the bootstrap context and injecting one).