Reputation: 359
There are lots of examples of how to use @ConfigurationProperties along with @PropertySource where configs are in a .properties or .yml file. How can I change the code so that it would use a config server instead? My code currently works correctly with @Value on each variable, but doesn't when switching to @ConfigurationProperties on the class.
Upvotes: 3
Views: 1058
Reputation: 23
This issue can be solved by increasing the version number of Spring Boot to greater than or equal to 2.0.3
. The issue tracker for this in Spring Cloud reveals how to solve it.
https://github.com/spring-cloud/spring-cloud-commons/issues/328
Upvotes: 2