spring: ++ server: + git: + uri: https://github.com/spring-cloud-samples/config-repospring: cloud: config: - server: - git: - uri: https://github.com/spring-cloud-samples/config-repo
diff --git a/spring-cloud-config.html b/spring-cloud-config.html index 0b08c85d..970031e0 100644 --- a/spring-cloud-config.html +++ b/spring-cloud-config.html @@ -483,7 +483,7 @@ IDE instead if you prefer (the main class is
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.
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
@@ -518,12 +518,12 @@ from a git repository (which must be provided):
spring: ++ server: + git: + uri: https://github.com/spring-cloud-samples/config-repospring: cloud: config: - server: - git: - uri: https://github.com/spring-cloud-samples/config-repo
@Configuration
-@EnableAutoConfiguration
+@SpringBootApplication
@RestController
public class Application {
@@ -773,11 +772,11 @@ one wins (like adding entries to a Map).
bootstrap.yml
-spring:
+spring:
application:
name: foo
profiles:
- active: dev,mysql
+ active: dev,mysql
@@ -836,12 +835,12 @@ using (for example):
-spring:
+spring:
cloud:
config:
server:
git:
- uri: https://github.com/myorg/{application}
+ uri: https://github.com/myorg/{application}
@@ -860,7 +859,7 @@ quoted). Example:
-spring:
+spring:
cloud:
config:
server:
@@ -873,7 +872,7 @@ quoted). Example:
uri: https://github.com/special/config-repo
local:
pattern: local*
- uri: file:/home/configsvc/config-repo
+ uri: file:/home/configsvc/config-repo
@@ -909,7 +908,7 @@ to run apps with multiple profiles. Example:
-spring:
+spring:
cloud:
config:
server:
@@ -925,7 +924,7 @@ to run apps with multiple profiles. Example:
pattern:
- */qa
- */production
- uri: https://github.com/staging/config-repo
+ uri: https://github.com/staging/config-repo
@@ -952,13 +951,13 @@ specified as searchPaths. For example at the top level:
-spring:
+spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
- searchPaths: foo,bar*
+ searchPaths: foo,bar*
@@ -973,7 +972,7 @@ at startup. For example at the top level:
-spring:
+spring:
cloud:
config:
server:
@@ -990,7 +989,7 @@ at startup. For example at the top level:
uri: http://git/team-b/config-repo.git
team-c:
pattern: team-c-*
- uri: http://git/team-a/config-repo.git
+ uri: http://git/team-a/config-repo.git
@@ -1005,14 +1004,14 @@ e.g.
-spring:
+spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
username: trolley
- password: strongpassword
+ password: strongpassword
@@ -1130,11 +1129,11 @@ hooks. To declare overrides just add a map of name-value pairs to
-spring:
+spring:
cloud:
config:
server:
- foo: bar
+ foo: bar
@@ -1182,7 +1181,7 @@ along with custom profiles and custom labels, e.g.
-spring:
+spring:
cloud:
config:
server:
@@ -1192,7 +1191,7 @@ along with custom profiles and custom labels, e.g.
label: mylabel
myservice-dev:
name: myservice
- profiles: development
+ profiles: development
@@ -1236,7 +1235,7 @@ in the JRE lib/security directory with the ones that you downloaded).
-If the remote property sources contain encryted content
+
If the remote property sources contain encrypted content
(values starting with {cipher}) they will be decrypted before
sending to clients over HTTP. The main advantage of this set up is
that the property values don’t have to be in plain text when they are
@@ -1252,10 +1251,10 @@ instance:
application.yml
-spring:
+spring:
datasource:
username: dbuser
- password: '{cipher}FKSAJDFGYOS8F7GLHAKERGFHLSAJ'
+ password: '{cipher}FKSAJDFGYOS8F7GLHAKERGFHLSAJ'
@@ -1421,12 +1420,12 @@ your application.yml for the Config Server:
-encrypt:
+encrypt:
keyStore:
location: classpath:/server.jks
password: letmein
alias: mytestkey
- secret: changeme
+ secret: changeme
@@ -1444,8 +1443,8 @@ i.e. with a cipher text like this:
foo:
- bar: `{cipher}{key:testkey}...`
+foo:
+ bar: `{cipher}{key:testkey}...`
spring.cloud.config.failFast=true, and then you need to add
spring-retry and spring-boot-starter-aop to your classpath. The default
behaviour is to retry 6 times with an initial backoff interval of 1000ms and an
exponential multiplier of 1.1 for subsequent backoffs. You can configure these
-properties (and others) using spring.config.retry.* configuration properties.
+properties (and others) using spring.cloud.config.retry.* configuration properties.