title: Java Custom Properties File Read integer values in spring
body: <p>Hi I have my own <code>properties</code> file, but when I want to get <code>order</code> value that time it returns <code>0</code>, how can I read integer value in custom spring properties class</p>
  
  <pre class="lang-java prettyprint-override"><code>@Component 
  @PropertySource("classpath:my.properties")
  @ConfigurationProperties 
  public class MyProperties {
  
      private Integer order;
  </code></pre>
  
  <p><code>my.properties</code> file like that</p>
  
  <pre><code>enableAll=true
  order=1
  myvalue=ABC
  </code></pre>