Git Product home page Git Product logo

centralized-configuration-with-spring-cloud-config's Introduction

Centralized-Configuration-with-Spring-Cloud-Config

                                            # Centralized configuration with Spring Cloud Config

In this blog post I am looking into Spring Cloud Config project which is a great tool for centralized configuration management in a microservice environment. I have prepared a simple example project which you can find on my github account. It contains a config-service leveraging Spring Cloud Config Server and three little services using Spring Cloud Config Client.

Clone the configuration and example repositories into your home directory and build the project.

git clone https://github.com/sagarmal624/Centralized-Configuration-with-Spring-Cloud-Config.git 

git clone https://github.com/sagarmal624/config-repo.git

In this Example we have two web services application(cloudnary,linkSharing).we have HomeController and application.proerties file in both web services application.Each Web Services has seprate db configuration.

alt text

we have one config server which is mainly used to fetch config properties from git repo and serve that config file to different web services which are config clients.

our config server is running on

http://localhost:8888/

To Enable Config Server we have @EnableConfigServer Annotation.In config server application we need to set git repo where you are going to push configuration properties file.

web services application is running on following port.

  • cloudnary appplication:

http://localhost:8181/name

  • linkSharing appplication:

http://localhost:8282/name

we need to set config server url in application .properties files for both web services.These application fetch application.properties configuration from config server.

Whenever application up and hit the url ... you will get name.

When you are going to change something in config repo->cloudnary.properties and linksharing.properties.It will automatically refresh in cloudnary application properties wihtout restarting the server.. To do this things we need to hit one url

http://localhost:8181/refresh with post request

http://localhost:8282/refresh with post request

TO broadcast: Kindly refer this url

https://springbootdev.com/2018/07/17/spring-cloud-config-refreshing-the-config-changes-with-spring-cloud-bus-part-2/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.