I am trying to learn Spring Cloud Config because the application I work on is deployed on different servers with different properties. Previously it used Ant and filtering to create properties for each server at deployment time. But we are moving to Maven. So that option is gone. And moreover it was a very crude way of going about things. But then again, 15 years ago that was the only option they had I guess.
Okay that is the background. I have read some tutorials and gone through some of the code given there. I wrote a Spring Boot App that reads the property files, and I try to fetch it on the browser.
But the problem is, the properties show up empty. It is a very basic piece of code. So it not working has really dented my confidence!
My code is like this:
And my application.properties is like:
My pom.xml is:
But when I hit the URL:
I only see this:
Now I am not quite sure why the propertySource would be empty here. It should list the properties that I have in the properties file. The tutorials make it look easy. And the startup logs, dont shed any light on it. Although I do not know what to look for really!
I am on a Windows machine and running the code in Eclipse.
Now I have seen different tutorials have different property keys for the search locations, can you please tell me which one is right?
I dont know what else information to provide, if you need anything else, please do let me know, I will add it to the question. Any help is greatly appreciated. Thanks!