What is Spring Cloud Config Server and why is centralized configuration important? स्प्रिंग क्लाउड कॉन्फिग सर्वर क्या है और केंद्रीकृत कॉन्फिगरेशन क्यों महत्वपूर्ण है?
In a microservices system with dozens of services, each with its own environment-specific properties, managing configuration per-service becomes unmanageable and makes rotating a shared value (like a database URL) require redeploying every service individually.
Spring Cloud Config Server centralizes configuration in one place — typically a Git repository — and serves it to every microservice at startup over HTTP. Each service, acting as a Config Client, fetches its configuration from the Config Server based on its application name and active profile, and combined with Spring Cloud Bus, configuration changes can even be broadcast to running services without a restart.
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication { ... }
spring:
config:
import: "configserver:http://localhost:8888"दर्जनों सर्विसेज़ वाले माइक्रोसर्विसेज़ सिस्टम में, हर सर्विस की अपनी एनवायरनमेंट-विशिष्ट प्रॉपर्टीज़ होने से, प्रति-सर्विस कॉन्फिगरेशन मैनेज करना अव्यावहारिक हो जाता है।
Spring Cloud Config Server कॉन्फिगरेशन को एक स्थान — आमतौर पर एक Git रिपॉज़िटरी — में केंद्रीकृत करता है और इसे स्टार्टअप पर हर माइक्रोसर्विस को HTTP के ज़रिए देता है। Spring Cloud Bus के साथ मिलाकर, कॉन्फिगरेशन बदलावों को बिना रीस्टार्ट के चल रही सर्विसेज़ तक भी प्रसारित किया जा सकता है।
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication { ... }Was this answer clear?