title: Spring can't autowire Map bean
body: <p>I've defined a map in spring as such:</p>
  <pre><code>&lt;util:map id=&quot;AdditionalParams&quot; scope=&quot;prototype&quot; map-class=&quot;java.util.HashMap&quot; 
            key-type=&quot;java.lang.String&quot; value-type=&quot;java.lang.String&quot;&gt;
      
      &lt;entry key=&quot;Start&quot; value=&quot;12345&quot; /&gt;
      &lt;entry key=&quot;Finish&quot; value=&quot;12365&quot; /&gt;
  &lt;/util:map&gt;
  </code></pre>
  <p>And then I'm autowiring this bean to a property defined as:</p>
  <pre><code>private @Autowired @Qualifier(value = &quot;AdditionalParams&quot;) Map&lt;String, String&gt; additionalParams;
  </code></pre>
  <p>When doing this, the an exception get's thrown saying that:</p>
  <blockquote>
  <p>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DutyCreator': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.Map DutyCreator.additionalParams; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [map with value type java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=AdditionalParams)}</p>
  <p>Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [map with value type java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=AdditionalParams)}</p>
  </blockquote>
  <p>Any ideas?</p>
  <p>Cheers.</p>