I want to bind my application.properties into a class automatically by using @ConfigurationProperties annotation. First, I tried with @Value annotation and was able to inject pr
The main problem is that you do not have setters. When you put setters to ConfigBuilder works fine. The ConfigBuilder must be like this
@Component @ConfigurationProperties(prefix="my") public class ConfigBinder { private String name; private String url; // Getters and Setters !!! }