JunsuLime / spring-cloud-native-explorer

Spring cloud explorer
1 stars 0 forks source link

profile 별로 다른 설정을 설정서버로부터 가져오자. (cloud-config) #29

Closed JunsuLime closed 2 years ago

JunsuLime commented 3 years ago

git 을 저장소로 사용할 때 어떻게 사용하는지 알아보자. https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_git_backend

To scale the Config Server up and make it highly available, you need to have all instances of the server pointing to the same repository, so only a shared file system would work.

이로 미뤄보아, config 서버는 동일한 저장소를 바라보고있다면 서버 증설을 해도 이슈가 없다.

JunsuLime commented 2 years ago

https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_environment_repository EnvironmentRepository 는

Client 입장에서는

에 대응 된다.

Github 을 EnviromentRepository 로 사용한다면

This repository implementation maps the {label} parameter of the HTTP resource to a git label (commit id, branch name, or tag).

label 을 commit_id, branch name, tag 에 대응된다.

JunsuLime commented 2 years ago

The HTTP service has resources in the following form:

/{application}/{profile}[/{label}]
/{application}-{profile}.yml
/{label}/{application}-{profile}.yml
/{application}-{profile}.properties
/{label}/{application}-{profile}.properties

https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_quick_start 여기서 매칭되는 리소스 경로 확인 완료.

JunsuLime commented 2 years ago

https://github.com/JunsuLime/spring-cloud-native-explorer-config 에서 설정 후 확인 완료!