킹다의 개발블로그

Spring Cloud Config Server 설정해보기 본문

02. 프레임워크/spring

Spring Cloud Config Server 설정해보기

킹다킹 2021. 8. 13. 10:31
반응형

Spring Cloud Config Server 설정

1. dependencies 추가

implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-server', version: '3.0.4'

2. boot Application 수정

@EnableConfigServer
어노테이션 추가 

3. application.yml 또는 application.properties 수정

server:
  port: 8888
spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/dayoon97/config-server-example/
          search-paths: example1
          default-label: main
http://localhost:8888/dayoon/dev 접속

깃에 저장한 yml 파일 내용을 확인할 수 있음

반응형

'02. 프레임워크 > spring' 카테고리의 다른 글

스프링 배치(Spring batch) - 1  (0) 2021.08.19
Spring Cloud Config Client 설정해보기  (0) 2021.08.13
@Valid  (0) 2021.08.12
Spring Security - 2  (0) 2021.08.10
Dao 와 Mapper의 차이  (2) 2021.08.10
Comments