Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Config Server

Biref

Spring Cloud Config is Spring's client/server approach for storing and serving distributed configurations across multiple applications and environments. This configuration store is ideally versioned under Git version control and can be modified at application runtime. While it fits very well in Spring applications using all the supported configuration file formats together with constructs like Environment, PropertySource, or @Value, it can be used in any environment running any programming language. In this tutorial, we'll focus on how to set up a PostgresSql Database-backed config server, use it in a simple REST application server, and set up a secure environment including encrypted property values.

Architecture

image

Le's Setup Our #Cloud Config Server.

Simplely Generate a Spring maven application with the following dependencies

dependcies

Open application.properties and the following details

application(1)

Create a bootstrap.yml in resources path and the following detais

ice_screenshot_20220815-171400

And last just enable the config server by Using @EnableConfigserver in your main application class

ice_screenshot_20220815-171706

We are done with config server so far.lets have look at our client application how our its interect with server

Config client

add the bellowing dependency

client xml

create a bootstrap.yml file and add the following details

ice_screenshot_20220815-172816

Then Simplely cretate a controller class and use the @Value annotation pass the property key in it.

ice_screenshot_20220815-173138

Then we Have create a properties table in which our property value would be stored

ice_screenshot_20220815-173710

that's we are ready to go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages