Spring Cloud Config Server
@EnableConfigServer, EK, Spring, Boot, application, ko, EK, Config, Server, mein, CONVERT, kar, deta hai — YE, TYPICALLY, EK, GIT, REPOSITORY, se, configuration, files, (application.yml, jaisi) SERVE, karta hai.
HAR, MICROSERVICE, STARTUP, PAR, Config, Server, se, apni, CONFIGURATION, FETCH, karti, hai — CONFIG, CHANGES, ke, liye, HAR, service, ko, INDIVIDUALLY, REBUILD/REDEPLOY, karne, ki, ZAROORAT, nahi, PADТi.
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}
}
// application.yml:
// spring.cloud.config.server.git.uri: https://github.com/myorg/config-repo- Config Server = centralized, configuration, — @EnableConfigServer
- Git, repository, se, config, files, serve, hote, hain typically
- Har service, startup, PAR, config, fetch, karti, hai — REDEPLOY, ki, zaroorat, nahi, changes, ke, liye
Config, Server, ko, bhi, MULTIPLE, instances, ke, saath, HIGHLY, AVAILABLE, banaya, ja, sakta hai, — YE, khud, EK, EUREKA, client, ki, tarah, register, ho, sakta hai, aur, DUSRI, services, ise, service, naam, se, discover, karti, hain.
spring.application.name: config-server
eureka.client.service-url.defaultZone: http://eureka:8761/eureka/spring.profiles.active=native, se, Config, Server, ko, GIT, ke, BAJAYE, LOCAL, FILESYSTEM, se, config, files, serve, karne, ke, liye, CONFIGURE, kiya, ja, sakta hai — LOCAL, DEVELOPMENT/TESTING, ke, liye, useful.