Remove locations attributes from @ConfigurationProperties
What are the alternatives?
I've been using it like this before.
@ConfigurationProperties(locations = "a.yml")
Same problem here: we have hundreds of configuration keys on several yaml files, each of them conveniently mapped to a pojo that we inject into our business logic beans.
The best thing I could do to upgrade to Spring Boot 1.5 and at the same time keep our production application running without much refactoring is described here: http://fabiomaffioletti.me/blog/2016/12/20/spring-configuration-properties-handle-deprecated-locations/
Or, if that does not work for you, you can try this way which is simpler even if requires more refactoring (remove the @ConfigurationProperties annotation): http://fabiomaffioletti.me/blog/2017/02/09/spring-configuration-properties-locations-deprecation-another-approach/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With