title: Springboot: Application.yaml and Inheritance
body: <p>I would like to read properties from the application.yaml into an @Configuration bean like this:</p>
  <pre><code>@Configuration
  @ConfigurationProperties(prefix = &quot;foo&quot;)
  @Getter @Setter
  public class MyProperties {
  
      private Set&lt;Bar&lt;?&gt;&gt; bars;
  
  }
  </code></pre>
  <p>The problem is <code>Bar</code> is an abstract type. My goal would be something like this in the YAML:</p>
  <pre><code>foo:
    bars:
    - type: BarA
      key1: val1
      key2: val2
    - type: BarB
      key1: val1
  </code></pre>
  <p>but so far I found no clue how to do so. Any ideas?</p>