Spring Boot Tutorial 0/110 lessons ~6 min read Lesson 70

    Config Server

    Spring Cloud Config Server centralises configuration for all your services in a Git repo.

    Course progress0%
    Focus
    2 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    Spring Cloud Config Server centralises configuration for all your services in a Git repo. Bump a property, restart pods, done — no rebuilds.

    Informative example

    bash
    # config-server
    @SpringBootApplication
    @EnableConfigServer
    public class ConfigApp { ... }
    # application.yml (config server)
    server.port: 8888
    spring:
    cloud:
    config:
    server:
    git:
    uri: https://github.com/acme/config-repo
    default-label: main
    # in each microservice
    spring:
    application: { name: orders-service }
    config:
    import: optional:configserver:http://config:8888
    Ready to mark this lesson complete?Track your journey across the entire course.