-
-
This connector provides the ability to configure Spring Cloud services locally for development or testing. The current implementation reads from Java properties only. Pull requests for also inspecting environment variables are welcome.
+
+
This connector provides the ability to configure Spring Cloud services locally for development or testing. The current implementation reads from Java properties only.
-
Quick start
+
Quick Start
-
Since service URIs contain passwords and should not be stored in code, this connector does not attempt to read service definitions out of the classpath. You can provide service definitions as system properties
+
Since service URIs contain passwords and should not be stored in code, this connector does not attempt to read service definitions out of the classpath. You can provide service definitions as system properties.
-
java -Dspring.cloud.database='mysql://user:pass@host:1234/dbname' -jar my-app.jar
+
java -Dspring.cloud.database='mysql://user:pass@host:1234/dbname' -jar my-app.jar
-
and from a configuration properties file either by setting the spring.cloud.propertiesFile system property
+
You can also provide service definitions from a configuration properties file, either by setting the spring.cloud.propertiesFile system property:
-
java -Dspring.cloud.propertiesFile=/path/to/spring-cloud.properties -jar my-app.jar
+
java -Dspring.cloud.propertiesFile=/path/to/spring-cloud.properties -jar my-app.jar
-
or by providing a bootstrap properties file on the runtime classpath named spring-cloud-bootstrap.properties. This file will be inspected for only the property named spring.cloud.propertiesFile, and its value will be interpolated from the system properties.
+
or by providing the bootstrap properties file spring-cloud-bootstrap.properties on the runtime classpath. This file will be inspected only for the property named spring.cloud.propertiesFile, and its value will be interpolated from the system properties.
@@ -1234,7 +1247,7 @@ table.CodeRay td.code>pre{padding:0}
-
The system properties or the configuration properties file should contain an application ID and the desired services in this format:
+
The system properties, or the configuration properties file, should contain an application ID and the desired services in the following format.
@@ -1244,54 +1257,49 @@ spring.cloud.database: mysql://user:pass@host:1234/dbname
-
Service type is determined by the URI scheme. The connector will activate if it finds a property (in the system properties or the configuration properties file) named spring.cloud.appId.
+
The service type is determined by the URI scheme. The connector will activate if it finds a property (either in the system properties or in the configuration properties file) named spring.cloud.appId.
-
Property sources
+
Property Sources
-
This connector first attempts to read the system properties generally and a system property named spring.cloud.propertiesFile specifically. If the system properties are not readable (the security manager denies checkPropertiesAccess), then they will be treated as empty. If a system property named spring.cloud.propertiesFile is found, that file will be loaded as a property list.
+
This connector first attempts to read the system properties generally and a system property named spring.cloud.propertiesFile specifically. If the system properties are not readable (if the security manager denies checkPropertiesAccess), then they will be treated as empty. If a system property named spring.cloud.propertiesFile is found, that file will be loaded as a property list.
-
Providing a bootstrap properties file
+
Providing a Bootstrap Properties File
-
To avoid having to manually configure run configurations or test runners with the path to the configuration properties file, the connector supports reading a templated filename out of the runtime classpath. This file must be named spring-cloud-bootstrap.properties and located at the classpath root, and for security the connector will not attempt to read any service URIs out of it. If the connector does find the file, it will read the property spring.cloud.propertiesFile and substitute the pattern ${system.property} with the appropriate value from the system properties. The most useful option is generally ${user.home}.
+
To avoid having to manually configure run configurations or test runners with the path to the configuration properties file, the connector can read a templated filename out of the runtime classpath. This file must be named spring-cloud-bootstrap.properties and be located at the classpath root. For security, the connector will not attempt to read any service URIs out of the file. If the connector does find the file, it will read the property spring.cloud.propertiesFile and substitute the pattern ${system.property} with the appropriate value from the system properties. The most useful option is generally ${user.home}.
A configuration properties file specified in the system properties will override any bootstrap file that may be available on the classpath.
-
Property precedence
+
Property Precedence
To provide the maximum configuration flexibility, the connector will override any properties (both application ID and service definitions) specified in the file at spring.cloud.propertiesFile with system properties defined at runtime. The connector will log a message at WARN if you override a service ID.
-
Activating the connector
+
Activating the Connector
-
The Spring Cloud core expects exactly one cloud connector match the runtime environment. This connector identifies the "local cloud" by the presence of a property named spring.cloud.appId in a configuration properties file or the system properties, which will be used in the ApplicationInstanceInfo.
+
Spring Cloud Core expects exactly one cloud connector to match the runtime environment. This connector identifies the “local cloud” by the presence of a property, in a configuration properties file or in the system properties, named spring.cloud.appId. This property will be used in the ApplicationInstanceInfo.
-
Service definitions
+
Service Definitions
-
If the connector is activated, it will iterate through all the available properties for keys matching the pattern spring.cloud.{serviceId}. Each value is interpreted as a URI to the services, and the type of service is determined from the scheme. All of the standard `UriBasedServiceInfo`s are supported.
+
If the connector is activated, it will iterate through all of the available properties for keys matching the pattern spring.cloud.{serviceId}. Each value is interpreted as a URI to a service, and the type of service is determined from the scheme. Every standard UriBasedServiceInfo is supported.
-
Supporting additional services
+
Supporting Additional Services
-
Add the fully-qualified class name for your creator to
-
-
-
-
META-INF/service/org.springframework.cloud.localconfig.LocalConfigServiceInfoCreator
-
+
Add the fully-qualified class name for your creator to META-INF/service/org.springframework.cloud.localconfig.LocalConfigServiceInfoCreator.
@@ -1305,7 +1313,7 @@ spring.cloud.database: mysql://user:pass@host:1234/dbname
diff --git a/spring-cloud-core.html b/spring-cloud-core.html
index f427c56..1d1059e 100644
--- a/spring-cloud-core.html
+++ b/spring-cloud-core.html
@@ -512,7 +512,7 @@ table.CodeRay td.code>pre{padding:0}