title: Set class in a interface list in YML
body: <p>I have an interface with 2 implementations. I need to explicitly set in the configuration file the implementation that I will use. For the moment I get an error <em>"Reason: The elements [api.services[0].esrigeolocationfinderserviceimpl,api.services[1].peliasgeolocationfinderserviceimpl] were left unbound"</em> when starting my spring boot app. Here are the classes : </p>
  
  <pre><code>public interface MyService {
     // Some methods here
  }
  
   @Data
   @Component
   @NoArgsConstructor
   public class MyFirstServiceImpl implements MyService {
  
       private String first;
   }
  
   @Data
   @Component
   @NoArgsConstructor
   public class MySecondServiceImpl implements MyService {
     private String second;
   }
  
   @Data
   @Configuration
   @EnableConfigurationProperties
   @ConfigurationProperties(prefix="api")
   public class MyConfig {
       @Autowired
       private List&lt;MyService&gt; services;
   }
  </code></pre>
  
  <p>application.yml : </p>
  
  <pre><code> api:
    services[0]: { first: aValue }
    services[1]: { second: anotherValue }
  </code></pre>
  
  <p>Do you know how can we set the values in the interface list ?</p>
  
  <p>Thank you</p>