title: Getting null value in property list from yaml in spring boot
body: <p>I'm working on a service and trying to read a property from a yaml file.
  I'm Getting a null in some on thems even if the value is set.
  This are the properties in yaml file:</p>
  <pre><code>property-combos:
    status:
      - codigo: ATIVA
        descricao: teste 1
      - codigo: CONCLUIDA
        descricao: teste 2
      - codigo: EXPIRADA
        descricao: teste 3
  </code></pre>
  <p>I'm reading the roperties with the following classes:</p>
  <pre><code>@Component
  @ConfigurationProperties(&quot;property-combos&quot;)
  @Validated
  public class StatusProperites {
  
      @Valid
      protected final List&lt;StatusDataItemProperties&gt; status = new ArrayList&lt;&gt;();
  
      public List&lt;StatusDataItemProperties&gt; getStatus() {
          return status;
      }
  }
  </code></pre>
  <p>This is the POJO</p>
  <pre><code>@Validated
  public class StatusDataItemProperties {
  
      @NotNull
      protected String codigo;
  
      @NotNull
      protected String descricao;
  
      public String getCodigo() {
          return codigo;
      }
  
      public void setCodigo(String codigo) {
          this.codigo = codigo;
      }
  
      public String getDecricao() {
          return descricao;
      }
  
      public void setDecricao(String descricao) {
          this.descricao = descricao;
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) return true;
          if (!(o instanceof StatusDataItemProperties)) return false;
          StatusDataItemProperties that = (StatusDataItemProperties) o;
          return Objects.equals(getCodigo(), that.getCodigo()) &amp;&amp;
                  Objects.equals(getDecricao(), that.getDecricao());
      }
  
      @Override
      public int hashCode() {
          return Objects.hash(getCodigo(), getDecricao());
      }
  }
  </code></pre>
  <p>And this is the component where i get the values from:</p>
  <pre><code>@Component
  public class StatusTransacaoComponent {
  
   
  
         private static final Logger LOG = LoggerFactory.getLogger(StatusTransacaoComponent.class);
          private static final String SUCESSO = &quot;000&quot;;
      
          @Autowired
          StatusProperites statusProperites;
      
          public List&lt;StatusDataItemProperties&gt; getStatusCombo(){
              return statusProperites.getStatus();
          }
      
      }
  </code></pre>
  <p><strong>Problem:</strong> The probles is when the app is starting the properties are readed, but the values are like this:</p>
  <pre><code>codigo: ATIVA
  descricao: null
  </code></pre>
  <p>And this happens with all of these properties</p>
  <p><strong>Tried solutions:</strong> I´ve tried to change variable and property name, but always I'm getting the null value in constant descricao.</p>
  <p><strong>Question:</strong> What could be happening and how can i resolve this,
  thanks.</p>