title: Could not autowire method
body: <p>I am getting this error</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: 
  Could not autowire method:
  </code></pre>
  
  <p>This is my spring's xml configuration.</p>
  
  <pre><code>&lt;bean ...&gt;   
  ...
      &lt;property name="InfoModel" ref="InfoModel"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Here is my code where I am autowiring this in Java class</p>
  
  <pre><code>  private InfoModel infoModel;
  
    @Autowired
    public void setInfoModel(InfoModel infoModel) {
      this.infoModel= infoModel;
    }
  </code></pre>
  
  <p>Am I missing something. I suspect that I should make an <code>Interface</code> of <strong>InfoModel</strong> in order to make it autowire?</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.model.InfoModel] 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.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:547)
  </code></pre>