title: Can't read yaml's complex object using @ConfigurationProperties. Integer cannot be cast to String
body: <p>I'm trying to read this yml file</p>
  
  <pre><code>dist-price:
    1234:
      foo: 4567
      bar: false
  </code></pre>
  
  <p>and put into this class. (I'm using Lombok and Spring Boot v1.5.4.RELEASE)</p>
  
  <pre><code>@Repository
  @ConfigurationProperties
  @Data
  @NoArgsConstructor
  public class WebConfigProperty {
      @NonNull
      private TreeMap&lt;Integer, Bound&gt; distPrice;
  }
  
  @Data
  @NoArgsConstructor
  public class Bound {
      @NonNull
      private Integer foo;
  
      @NonNull
      private Boolean bar;
  }
  </code></pre>
  
  <p>But I got this error.</p>
  
  <pre><code>Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
      at java.lang.String.compareTo(Unknown Source)
      at java.util.TreeMap.getEntry(Unknown Source)
      at java.util.TreeMap.get(Unknown Source)
      at org.springframework.boot.bind.RelaxedDataBinder.isBlanked(RelaxedDataBinder.java:328)
      at org.springframework.boot.bind.RelaxedDataBinder.initializePath(RelaxedDataBinder.java:283)
      at org.springframework.boot.bind.RelaxedDataBinder.normalizePath(RelaxedDataBinder.java:259)
      at org.springframework.boot.bind.RelaxedDataBinder.modifyProperty(RelaxedDataBinder.java:240)
      at org.springframework.boot.bind.RelaxedDataBinder.modifyProperties(RelaxedDataBinder.java:155)
      at org.springframework.boot.bind.RelaxedDataBinder.doBind(RelaxedDataBinder.java:128)
      at org.springframework.validation.DataBinder.bind(DataBinder.java:740)
      at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:272)
      at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:240)
      at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:329)
      ... 73 common frames omitted
  </code></pre>
  
  <p>If I change <code>TreeMap&lt;Integer, Bound&gt;</code> to <code>TreeMap&lt;String, Bound&gt;</code> it works fine. But I really need to use <code>Integer</code>. It seems like <code>TreeMap</code>'s key (in this case: <code>1234</code>) is being cast to <code>String</code>. I don't know why.</p>
  
  <p>It was fine when <code>TreeMap&lt;Integer, Bound&gt;</code> was <code>TreeMap&lt;Integer, Integer&gt;</code>, and yml was like this.</p>
  
  <pre><code>dist-price:
    1234: 4567
  </code></pre>
  
  <p><strong>EDIT:</strong> I tried Spring Boot <code>v1.5.9.RELEASE</code>, but no luck.</p>