title: Autowiring is not working when configured through XML
body: <pre><code>class ConfigurationDetails {
      private @Resource String esHostURL;
      private @Resource int maxMessageCounter;
      private @Resource String queueName;
     // Assume : This class has all getter and setter methods and a default constructor
  }
  </code></pre>
  
  <p>Another Class</p>
  
  <pre><code>public class SpringMessageListener implements MessageListener {
      @Resource ConfigurationDetails configDetails; // With getter and setter method for this
  ............
  ..........
  </code></pre>
  
  <p>And in my XML</p>
  
  <pre><code>&lt;bean id="aListener" class="com.vzw.es.cosumer.SpringMessageListener" autowire="byName"/&gt;
  &lt;bean id="configDetails" class="com.vzw.es.pojo.ConfigurationDetails"  autowire="byName"&gt;
      &lt;property name="esHostURL" value="http://obsgracstg-db0.odc.vzwcorp.com:9200"/&gt;
      &lt;property name="maxMessageCounter" value="500"/&gt;
      &lt;property name="queueName" value="ES_queue"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Now the bean with id configDetails is not getting autowired meaning when I debug the code and see the configDetails in class SpringMessageListerner it is showing null. But when I explicitly do the appContext.getBean("configDetails") it gives me the not null Object.</p>
  
  <p>Why is the Autowiring is not working? Am I missing anything?</p>