Yapılandırma Sunucusu
Yapılandırmayı merkezi bir sunucudan sunun.
Yapılandırma Sunucusu, CoddyKit'te ücretsiz bir Spring Boot 4 Microservices & REST APIs dersidir. Bu, 4 dersinin 1. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Spring Boot 4 Microservices & REST APIs öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Spring Boot 4 Microservices & REST APIs kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
The configuration problem
In a microservices system, many services each need configuration. Duplicating application.yml everywhere is error-prone. Spring Cloud Config centralizes configuration in one server.
What the Config Server does
The Config Server is a small Spring Boot app that serves configuration to client services over HTTP, typically backed by a Git repository.
- One place to view and change config
- Versioned, auditable changes
Adding the server dependency
Create a new app and add spring-cloud-config-server.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>@EnableConfigServer
Annotate the main class with @EnableConfigServer to turn the app into a Config Server.
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApp {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApp.class, args);
}
}Pointing at a backend
The server needs a backend to read config from. The most common is a Git repo, set with spring.cloud.config.server.git.uri.
# application.yml of the server
spring:
cloud:
config:
server:
git:
uri: https://github.com/acme/config-repoRunning on a known port
Config Servers conventionally run on port 8888 so clients can find them with default settings.
server:
port: 8888How config is addressed
The server resolves config by application name and profile. A client named orders with profile prod maps to files like orders-prod.yml in the repo.
The server HTTP API
You can query the server directly. The path is /{application}/{profile} and it returns the merged properties as JSON.
// GET http://localhost:8888/orders/prod
// returns merged config for app=orders, profile=prodNative (filesystem) backend
For local development you can use a filesystem backend instead of Git via the native profile - convenient but not versioned.
spring:
profiles:
active: native
cloud:
config:
server:
native:
search-locations: file:./configSecuring the server
Config can contain secrets, so protect the server with HTTP Basic auth (Spring Security) and run it behind your private network. Clients then send credentials.
Encryption support
The server can store encrypted values (prefixed {cipher}) and decrypt them on the fly, so secrets are never stored in plaintext in the repo - provided a key is configured.
Quick Check
Check your Config Server fundamentals.
Recap
You stood up a Config Server:
- It centralizes config and serves it over HTTP
@EnableConfigServer+ a Git (or native) backend- Runs on port 8888 by convention
- Resolves config by application name and profile
Sıkça Sorulan Sorular
“Yapılandırma Sunucusu” dersi ücretsiz mi?
Evet — “Yapılandırma Sunucusu” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Spring Boot 4 Microservices & REST APIs kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Spring Boot 4 Microservices & REST APIs kursu toplamda 4 dersten oluşur.
“Yapılandırma Sunucusu” dersinde ne öğreneceğim?
Yapılandırmayı merkezi bir sunucudan sunun. Spring Boot 4 Microservices & REST APIs ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Spring Boot 4 Microservices & REST APIs öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Spring Boot 4 Microservices & REST APIs, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 1. dersidir.
“Yapılandırma Sunucusu” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Spring Boot 4 Microservices & REST APIs dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Spring Boot 4 Microservices & REST APIs dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Yapılandırma Sunucusu
- Git Destekli Yapılandırma
- Yapılandırma İstemcileri
- Çalışma Zamanında Yapılandırmayı Yenileme