title: Spring bean injection of Integer fails
body: <p>I have defined 4 beans of type java.lang.Integer. 
  Two beans are injected properly(gradeSyncMinCount and gradeSyncMaxCount) but I have issue injecting the other 2. These 2 beans that have a problem are the ones I just created. 
  Also the same 4 beans can be successfully injected into a controller class. I tried @Qualifier, @Resource, @Autowired. I checked for component scan as well. 
  I dont see what I am missing.Please help.</p>
  
  <p>Caused by: </p>
  
  <pre><code>org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [java.lang.Integer] is defined: expected single matching bean but found 2: gradeSyncMaxCount,gradeSyncMinCount
  </code></pre>
  
  <p>My Java class</p>
  
  <pre><code>@Autowired
  private Integer gradeSyncMinCount;
  @Autowired
  private Integer gradeSyncMaxCount;
  @Autowired
  private Integer maxDeliveryAttempt;
  @Autowired
  private Integer maxDaysToKeep;
  </code></pre>
  
  <p>My applicationContext.xml</p>
  
  <pre><code>&lt;bean id="maxDeliveryAttempt" class="java.lang.Integer"&gt;
  &lt;constructor-arg value="4" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="maxDaysToKeep" class="java.lang.Integer"&gt;
  &lt;constructor-arg value="200" /&gt;
  &lt;/bean&gt;
  &lt;bean id="gradeSyncMaxCount" class="java.lang.Integer"&gt;
  &lt;constructor-arg value="500" /&gt;
  &lt;/bean&gt;  
  &lt;bean id="gradeSyncMinCount" class="java.lang.Integer"&gt;
  &lt;constructor-arg value="15" /&gt;
  &lt;/bean&gt;
  </code></pre>