diff --git a/README.adoc b/README.adoc index bd9fdf97..19df2926 100644 --- a/README.adoc +++ b/README.adoc @@ -1,5 +1,6 @@ // Do not edit this file (e.g. go instead to docs/src/main/asciidoc) + 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. @@ -47,7 +48,7 @@ $ curl localhost:8888/foo/development ---- The default strategy for locating property sources is to clone a git -repository (at "spring.cloud.config.server.git.uri") and use it to +repository (at `spring.cloud.config.server.git.uri`) and use it to initialize a mini `SpringApplication`. The mini-application's `Environment` is used to enumerate property sources and publish them via a JSON endpoint. @@ -62,7 +63,7 @@ The HTTP service has resources in the form: /{label}/{application}-{profile}.properties ---- -where the "application" is injected as the "spring.config.name" in the +where the "application" is injected as the `spring.config.name` in the `SpringApplication` (i.e. what is normally "application" in a regular Spring Boot app), "profile" is an active profile (or comma-separated list of properties), and "label" is an optional git label (defaults to @@ -75,13 +76,14 @@ map, even if the origin of the values (reflected in the Spring Cloud Config Server pulls configuration for remote clients from a git repository (which must be provided): +[source,yaml] ---- spring: cloud: config: - server: - git: - uri: https://github.com/spring-cloud-samples/config-repo + server: + git: + uri: https://github.com/spring-cloud-samples/config-repo ---- === Client Side Usage @@ -144,8 +146,7 @@ users. Example Maven configuration: Then you can create a standard Spring Boot application, like this simple HTTP server: ---- -@Configuration -@EnableAutoConfiguration +@SpringBootApplication @RestController public class Application { @@ -372,6 +373,11 @@ repository, but it does mean that we can accept your contributions, and you will author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests. +=== Code of Conduct +This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of +conduct]. By participating, you are expected to uphold this code. Please report +unacceptable behavior to spring-code-of-conduct@pivotal.io. + === Code Conventions and Housekeeping None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge. @@ -379,7 +385,7 @@ added after the original pull request but before a merge. * Use the Spring Framework code format conventions. If you use Eclipse you can import formatter settings using the `eclipse-code-formatter.xml` file from the - https://github.com/spring-cloud/spring-cloud-build/blob/master/spring-cloud-build/eclipse-code-formatter.xml[Spring + https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring Cloud Build] project. If using IntelliJ, you can use the http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin] to import the same file.