From 8e93a582691391f547efa77122b4541833fd7b80 Mon Sep 17 00:00:00 2001
From: buildmaster When this HTTP server runs, it picks up the external configuration from the default local config server (if it is running) on port 8888.
-To modify the startup behavior, you can change the location of the config server by using By default, if no application name is set, When setting the property The bootstrap properties show up in the bootstrap.properties (similar to application.properties but for the bootstrap phase of an application context), as shown in the following example:spring.cloud.config.uri: http://myconfigserver.com
application will be used as the default. To modify the name, the following property can be added to the bootstrap.properties file:spring.application.name: myapp
![[Note]](images/note.png)
Note ${spring.application.name} do not prefix your app name with the reserved word application- to prevent issues resolving the correct property source./env endpoint as a high-priority property source, as shown in the following example.$ curl localhost:8080/env
+To modify the startup behavior, you can change the location of the config server by using
bootstrap.properties (similar to application.properties but for the bootstrap phase of an application context), as shown in the following example:
spring.cloud.config.uri: http://myconfigserver.com
By default, if no application name is set, application will be used. To modify the name, the following property can be added to the bootstrap.properties file:
spring.application.name: myapp
![]() | Note |
|---|---|
When setting the property |
The bootstrap properties show up in the /env endpoint as a high-priority property source, as shown in the following example.
$ curl localhost:8080/env
{
"profiles":[],
"configService:https://github.com/spring-cloud-samples/config-repo/bar.properties":{"foo":"bar"},
diff --git a/single/spring-cloud-config.html b/single/spring-cloud-config.html
index c39e8a95..8e9f3a41 100644
--- a/single/spring-cloud-config.html
+++ b/single/spring-cloud-config.html
@@ -77,7 +77,7 @@ public class Application {
}
}When this HTTP server runs, it picks up the external configuration from the default local config server (if it is running) on port 8888.
-To modify the startup behavior, you can change the location of the config server by using bootstrap.properties (similar to application.properties but for the bootstrap phase of an application context), as shown in the following example:
spring.cloud.config.uri: http://myconfigserver.com
By default, if no application name is set, application will be used as the default. To modify the name, the following property can be added to the bootstrap.properties file:
spring.application.name: myapp
![]() | Note |
|---|---|
When setting the property |
The bootstrap properties show up in the /env endpoint as a high-priority property source, as shown in the following example.
$ curl localhost:8080/env +To modify the startup behavior, you can change the location of the config server by usingbootstrap.properties(similar toapplication.propertiesbut for the bootstrap phase of an application context), as shown in the following example:spring.cloud.config.uri: http://myconfigserver.comBy default, if no application name is set,
applicationwill be used. To modify the name, the following property can be added to thebootstrap.propertiesfile:spring.application.name: myapp
Note When setting the property
${spring.application.name}do not prefix your app name with the reserved wordapplication-to prevent issues resolving the correct property source.The bootstrap properties show up in the
/envendpoint as a high-priority property source, as shown in the following example.$ curl localhost:8080/env { "profiles":[], "configService:https://github.com/spring-cloud-samples/config-repo/bar.properties":{"foo":"bar"}, diff --git a/spring-cloud-config.xml b/spring-cloud-config.xml index 85e4c565..88558c06 100644 --- a/spring-cloud-config.xml +++ b/spring-cloud-config.xml @@ -113,7 +113,7 @@ public class Application {When this HTTP server runs, it picks up the external configuration from the default local config server (if it is running) on port 8888. To modify the startup behavior, you can change the location of the config server by using bootstrap.properties (similar toapplication.properties but for the bootstrap phase of an application context), as shown in the following example:spring.cloud.config.uri: http://myconfigserver.com -By default, if no application name is set, +application will be used as the default. To modify the name, the following property can be added to thebootstrap.properties file:By default, if no application name is set, application will be used. To modify the name, the following property can be added to thebootstrap.properties file:spring.application.name: myapp When setting the property ${spring.application.name} do not prefix your app name with the reserved wordapplication- to prevent issues resolving the correct property source.