title: Spring @Autowire Bean constructor NoSuchBeanDefinitionException Hibernate Service
body: <p>I have the following error, when I try to Autowire my Bean constructor:</p>
  
  <blockquote>
    <p>Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [dimensionmanagement.service.DimensionService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:920)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:789)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
        ... 89 more</p>
  </blockquote>
  
  <p>I have defined the dimensionmanagement.service.DimensionService like that:</p>
  
  <pre><code>@Service @Transactional public class DimensionService implements Serializable {
  </code></pre>
  
  <p>in my applicationContext.xml :</p>
  
  <pre><code>&lt;context:annotation-config/&gt;
  &lt;bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/&gt;
  &lt;context:component-scan base-package="dimensionmanagement" /&gt;
  </code></pre>
  
  <p>if any more questions please ask!
  Thanks Jonas</p>