I have externalized properties defined in separate jar. I want to read this in Spring cloud config server and expose this as service to connecting app. These properties would vary depending on environment, again using Profile, one can get relevant properties.
I see there are many ways to do this, using PropertySource
One with PropertySourcesPlaceholderConfigurer
. Few approaches are using Environment
What are pros and cons between each approach. This might be community question. I see plenty of questions on this area, but there isn't a uniformed, guideline on what approach we need to use for the different scenarios? One of the youtube video talks about having 15 different ways to pick properties. I would like to know more around this area and so that this might be useful for other developers