From 0f91d17105dca499a06e89180982ce2eee8e8676 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Sat, 8 Nov 2014 19:31:25 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-config.html | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/spring-cloud-config.html b/spring-cloud-config.html index 414d4b75..37a9fe2a 100644 --- a/spring-cloud-config.html +++ b/spring-cloud-config.html @@ -422,11 +422,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Spring Cloud Config Server
  • Spring Cloud Config Client @@ -634,6 +636,53 @@ server is easily embeddable in a Spring Boot application using the @EnableConfigServer annotation.

    +

    Environment Repository

    +
    +

    Where do you want to store the configuration data for the Config +Server? The strategy that governs this behaviour is the +EnvironmentRepository, serving Environment objects. This +Environment is a shallow copy of the domain from the Spring +Environment (including propertySources as the main feature). The +default implementation of EnvironmentRepository 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 +application.yml). If you set it with a file: 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.

    +
    +
    +

    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).

    +
    +
    +
    +

    Embedding the Config Server

    +
    +

    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".

    +
    +
    +

    Security

    You are free to secure your Config Server in any way that makes sense @@ -820,7 +869,7 @@ your application.yml for the Config Server:

    -

    Embedding the Config Server

    +

    Embedding the Config Server

    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).