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
Adds configurable kv watch and listener #97
Conversation
@@ -248,6 +248,11 @@ | |||
<version>${lombok.version}</version> | |||
<scope>provided</scope> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the commons-collections dependency.
Your build failed with
any ideas? |
I think with a few tweaks this will be good. |
No clue what happened with that build failure. That class should and appears to have been included in the initial commit. |
@toast2e as far as I can tell, this only updates existing properties? It doesn't do deletes or add new properties. Is that correct? |
It should do all of those things. There are test included for each of those |
@EnableConfigurationProperties | ||
@EnableScheduling | ||
@ConditionalOnProperty(name = "spring.cloud.consul.config.watch", matchIfMissing = false) | ||
public class ConsulConfigWatchConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be conditional on the actuator Endpoint.class
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the property or instead of? Also, not 100% sure I follow. Adding the following to the class:
@conditional(Endpoint.class)
Doesn't appear to work as the Endpoint class doesn't extend Condition. Is this what you meant or did I misunderstand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ConditionalOnClass(Endpoint.class)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, this backs of if spring-boot-actuator isn't on the classpath.
Sorry this hasn't gotten much attention over the holidays. |
No worries. I was able to get in a better handling of deletes (worked fine for properties that existed at startup but had issues with ones that had been added later). Let me know if there's anything else that needs to be addressed. |
@toast2e you've got bunch of commits that aren't yours. |
I want to move on this before we do a release candidate. |
I hope that did it. Pulled down latest, rebased, and force pushed everything back. Let me know if there are other issues. |
That looks much better. |
And, of course after forcing an update of spring-cloud-commons, the updates aren't working again. This is going to need another round of tweaking. |
…ary property source reinit
Closed in favor of d1141a8 |
Pulled fresh copy of project and added the kv watch on top. No more issues with 3 way merge. Also updated the event thrown to contain a full map of changed keys and values at the request of a user.