title: Spring Autowire primitive boolean
body: <p>My XML configuration includes these bean definitions:</p>
  
  <pre><code>&lt;bean id="abstractFormAction" class="staffing.server.action.form.AbstractFormAction" abstract="true" parent="baseAction"&gt;
      &lt;property name="volunteerSaver" ref="volunteerSaver"/&gt;
      &lt;property name="emailSender" ref="emailSender"/&gt; 
      &lt;property name="closed" value="${form.closed}"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="volunteerFormAction" class="staffing.server.action.form.VolunteerFormAction" parent="abstractFormAction"&gt;
      &lt;property name="captchaGenerator" ref="captcha"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Indicating that VolunteerFormAction is a concrete implementation of AbstactFormAction, and will inherit the properties of AbstactFormAction.</p>
  
  <p>In AbstractFormAction, I declare the properties like this:</p>
  
  <pre><code>@Autowired protected VolunteerSaver volunteerSaver;
  @Autowired protected EmailSender emailSender;
  @Autowired protected boolean closed;
  </code></pre>
  
  <p>I get the following exception when I try to deploy:</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'volunteerFormAction': Injection of autowired
    dependencies failed; nested exception is
    org.springframework.beans.factory.BeanCreationException: Could not
    autowire field: protected boolean
    staffing.server.action.form.AbstractFormAction.closed; nested
    exception is
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No
    matching bean of type [boolean] found for dependency: expected at
    least 1 bean which qualifies as autowire candidate for this
    dependency. Dependency annotations:
    {@org.springframework.beans.factory.annotation.Autowired(required=true)}</p>
  </blockquote>
  
  <p>It seems to be complaining that it cannot find a bean of byte boolean. But why would it want a bean when have defined property 'closed' by value, not by reference?</p>