Skip to content

Demo project to demonstrate spring cloud config server, accessing the configurations from centralized git repo

Notifications You must be signed in to change notification settings

santhoshvernekar/spring-cloud-config-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring-Cloud-Config-Server

The spring-boot project to demonstrate Spring cloud config server by accesing the configuration from a git repo config-repo

To Build project:

run mvn clean install

Steps:

  • [optional] To check the service getting registered with service discovery, we need to run the service discovery on our machine, You can find project in my repo eureka-service-discovery
  • Step 1: Launch the service discovery
  • Step 2: Update spring.cloud.config.server.git.uri property in properties file/yaml to the git/svn repo from which you want to access the configuration properties (sample: spring.cloud.config.server.git.uri=https://github.com/santhoshvernekar/config-repo.git)
  • Step 3: Launch the config-server application
  • Step 4: Spring-cloud-config server provides REST based feature to access the configuration,

The request should be in the format of: config-server-URL/app-name/profile/{label}

  • app-name: The name of the application (Mandatory)
  • profile: The spring-profile set while defining the configuration ex: prod,dev,default, by default we can mention value as "default" (Mandatory)
  • label: An Optional parameter to specify the different labels defined

We can get the configurations in the desired format (Supported formats: json/yaml/properties )

For Example: Config server is running on localhost 8888 port, so we can retrieve the configurations with below requests

Happy Coding!!

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

About

Demo project to demonstrate spring cloud config server, accessing the configurations from centralized git repo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages