Open stubob opened 3 years ago
Hello @stubob,
I am very sorry somehow I did not notice this till now! I am glad this blog helped you! I liked your suggestions. Would you mind, fork and making the change in my repo named "blog"? And make PR (pull request), I will merge the changes in and the blog will be updated. (url: https://github.com/sasiperi/blog)
Its OK if you can not, and it's too much work for you, I will make the change later.
THANKS AGAIN for the feedback and great suggestions!
Regards Sasi Peri
Hey, your article was a life-saver. Not sure how many people are left out there that want to enable Spring Cloud Config for a legacy app, but I sure will use it. I had a couple changes to the code if you're interested. I ditched the second class for the Environment and just included it inline:
I also put in a check to see if the PropertySource loaded correctly:
I wanted to be able to use the bootstrap.properties like CloudConfigClient is supposed to when it starts up, so I changed:
to load bootstrap.properties if it exists, and add it as the first PropertySource. That way I can put spring.cloud.config.uri and spring.application.name in bootstrap.properties. Other than that, this was just what I needed. I went back and forth between trying to load my applicationConfig.xml from Spring, or loading Spring from the applicationConfig.xml.
I wanted to comment on the article, but the page won't reload once I log in. Thanks again.