Spring Boot: Multiple similar ConfigurationProperties with different Prefixes
I achieved almost same thing that you trying. first, register each properties beans. @Bean @ConfigurationProperties(prefix = “serviceA”) public ServiceProperties serviceAProperties() { return new ServiceProperties (); } @Bean @ConfigurationProperties(prefix = “serviceB”) public ServiceProperties serviceBProperties() { return new ServiceProperties (); } and at service(or someplace where will use properties) put a @Qualifier and specified which property would … Read more