Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #22 Making switching easier between github and local repository #26

Merged
merged 4 commits into from
Dec 15, 2016

Conversation

mszarlinski
Copy link
Collaborator

Introduced local profile

@mszarlinski
Copy link
Collaborator Author

@arey please review

@arey
Copy link
Member

arey commented Dec 6, 2016

When I add below VM options to my ConfigServerApplication, the config server is using my local git repo:

-Dspring.profiles.active=local -DGIT_REPO=/Users/arey/Dev/spring-petclinic-microservices-config

It's perfect. Maybe just add this option into the README?

I've got a question: is it a way to switch between local and github configuration without to restart the config server? I mean, does a micro-service could choose the config it wants to use (local or github) by activating a Spring profile at startup?

@mszarlinski
Copy link
Collaborator Author

I think this is impossible to achieve using profiles which are activated on application startup. Profiles switching would require Spring context to be rebuilt. On the other hand, I think that dynamic repo configuration would be a helpful feature and it might be done using Spring Cloud Bus and @RefreshScope (pushing confit changes to clients) - some research needed.

@mszarlinski mszarlinski merged commit 4af4847 into spring-petclinic:master Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants