Giter Site home page Giter Site logo

spring-config-server-api's Introduction

API for Spring Cloud Config Server

1. ~/editConfig

컨피그 서버에 바꿀 설정키와 값을 요청하면 레파지토리의 설정파일이 수정되는 API입니다.
해당 엔드포인트로 JSON형식으로 요구정보를 보내면 config server repository의 yml파일이 수정됩니다.
저장소정보와 수정/추가할 key, value만 보내면 yml에 수정/추가 됩니다.

설정파일 수정요청

수정요청사항을 Json형식으로 요청합니다.

  • username: 깃허브의 계정이름
  • repo : repository의 이름
  • rootPath : 수정할 파일이 있는 경로
  • token : 쓰기 권한이 있는 깃계정 토큰 OAuth2
  • key: 설정파일(yml)에서 추가하거나 수정할 키(property)의 이름
  • newValue : key의 값에 해당하는 값. String이 아니면 더블쿼트를 입력하지 않는것이 중요합니다

수정전의 yml파일 내용입니다.

원래 설정파일

test.testsub가 있으면 수정하고 없으면 추가하라는 POST 요청을 한 결과를 리턴합니다.

요청대로 변경된 설정파일 수정결과

2. ~/refreshAll

config server와 연결된 repository에서 수정이 발생할때마다 저장소 전체를 새로고침하는 API입니다.
수정할때마다 http://configServerDomain/monitor 에 path=*를 POST하도록 합니다.
Git 저장소 Webhook 주소로 http://configServerDomain/refreshAll추가하면됩니다.
Webhook에서 configServerDomain은 외부에서 접속가능한 ip여야합니다.
refreshAll을 사용하면 설정 수정이 발생해도 무중단 수정이 가능해집니다.

spring-config-server-api's People

Contributors

shin-minkyung avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.