From 601e2b724c7487908311c7aacefd75dd8ef60057 Mon Sep 17 00:00:00 2001
From: buildmaster myApp has the dev
You can use resources with these file names to configure global defaults and have them be overridden by application-specific files as necessary.
The #_property_overrides[property overrides] feature can also be used for setting global defaults, with placeholders applications allowed to override them locally.
![]() | Tip |
|---|---|
With the “native” profile (a local file system backend) , you should use an explicit search location that is not part of the server’s own configuration.
Otherwise, the |
When using Vault as a backend, you can share configuration with all applications by placing configuration in secret/application.
-For example, if you run the following Vault command, all applications using the config server will have the properties foo and baz available to them:
$ vault write secret/application foo=bar baz=bam
Spring Cloud Config Server supports JDBC (relational database) as a backend for configuration properties.
+For example, if you run the following Vault command, all applications using the config server will have the properties foo and baz available to them:
$ vault write secret/application foo=bar baz=bam
When using CredHub as a backend, you can share configuration with all applications by placing configuration in /application/ or by placing it in the default profile for the application.
+For example, if you run the following CredHub command, all applications using the config server will have the properties shared.color1 and shared.color2 available to them:
credhub set --name "/application/profile/master/shared" --type=json
+value: {"shared.color1": "blue", "shared.color": "red"}credhub set --name "/my-app/default/master/more-shared" --type=json
+value: {"shared.word1": "hello", "shared.word2": "world"}Spring Cloud Config Server supports JDBC (relational database) as a backend for configuration properties.
You can enable this feature by adding spring-jdbc to the classpath and using the jdbc profile or by adding a bean of type JdbcEnvironmentRepository.
If you include the right dependencies on the classpath (see the user guide for more details on that), Spring Boot configures a data source.
The database needs to have a table called PROPERTIES with columns called APPLICATION, PROFILE, and LABEL (with the usual Environment meaning), plus KEY and VALUE for the key and value pairs in Properties style.
All fields are of type String in Java, so you can make them VARCHAR of whatever length you need.
@@ -340,7 +343,8 @@ value: {"marketing.enabled": true, "external.enabled": false}
All client toggle.link: "red", marketing.enabled: true, external.enabled: false -}
![]() | Note |
|---|---|
When no profile is specified |
You can authenticate with OAuth 2.0 using UAA as a provider.
pom.xml. +}
![]() | Note |
|---|---|
When no profile is specified |
You can authenticate with OAuth 2.0 using UAA as a provider.
pom.xml.
<dependencies> <dependency> <groupId>org.springframework.security</groupId> diff --git a/2.1.x/multi/multi_spring-cloud-config.html b/2.1.x/multi/multi_spring-cloud-config.html index 7ca38783..7ff1e960 100644 --- a/2.1.x/multi/multi_spring-cloud-config.html +++ b/2.1.x/multi/multi_spring-cloud-config.html @@ -1,3 +1,3 @@ -Spring Cloud Config \ No newline at end of file +Table of Contents
- 1. Quick Start
- 2. Spring Cloud Config Server
- 2.1. Environment Repository
- 2.1.1. Git Backend
- Skipping SSL Certificate Validation
- Setting HTTP Connection Timeout
- Placeholders in Git URI
- Pattern Matching and Multiple Repositories
- Authentication
- Authentication with AWS CodeCommit
- Git SSH configuration using properties
- Placeholders in Git Search Paths
- Force pull in Git Repositories
- Deleting untracked branches in Git Repositories
- Git Refresh Rate
- 2.1.2. Version Control Backend Filesystem Use
- 2.1.3. File System Backend
- 2.1.4. Vault Backend
- 2.1.5. Accessing Backends Through a Proxy
- 2.1.6. Sharing Configuration With All Applications
- 2.1.7. JDBC Backend
- 2.1.8. CredHub Backend
- 2.1.9. Composite Environment Repositories
- 2.1.10. Property Overrides
- 2.2. Health Indicator
- 2.3. Security
- 2.4. Encryption and Decryption
- 2.5. Key Management
- 2.6. Creating a Key Store for Testing
- 2.7. Using Multiple Keys and Key Rotation
- 2.8. Serving Encrypted Properties
- 3. Serving Alternative Formats
- 4. Serving Plain Text
- 5. Embedding the Config Server
- 6. Push Notifications and Spring Cloud Bus
- 7. Spring Cloud Config Client
Spring Cloud Config Table of Contents
- 1. Quick Start
- 2. Spring Cloud Config Server
- 2.1. Environment Repository
- 2.1.1. Git Backend
- Skipping SSL Certificate Validation
- Setting HTTP Connection Timeout
- Placeholders in Git URI
- Pattern Matching and Multiple Repositories
- Authentication
- Authentication with AWS CodeCommit
- Git SSH configuration using properties
- Placeholders in Git Search Paths
- Force pull in Git Repositories
- Deleting untracked branches in Git Repositories
- Git Refresh Rate
- 2.1.2. Version Control Backend Filesystem Use
- 2.1.3. File System Backend
- 2.1.4. Vault Backend
- 2.1.5. Accessing Backends Through a Proxy
- 2.1.6. Sharing Configuration With All Applications
- 2.1.7. JDBC Backend
- 2.1.8. CredHub Backend
- 2.1.9. Composite Environment Repositories
- 2.1.10. Property Overrides
- 2.2. Health Indicator
- 2.3. Security
- 2.4. Encryption and Decryption
- 2.5. Key Management
- 2.6. Creating a Key Store for Testing
- 2.7. Using Multiple Keys and Key Rotation
- 2.8. Serving Encrypted Properties
- 3. Serving Alternative Formats
- 4. Serving Plain Text
- 5. Embedding the Config Server
- 6. Push Notifications and Spring Cloud Bus
- 7. Spring Cloud Config Client