title: @PostConstruct spring does not get called without bean declaration
body: <p>Why post construct does not get called without putting bean in applicationContext.xml</p>
  
  <p>Here is my class which contains @PostConstruct annotation. </p>
  
  <pre><code>package org.stalwartz.config;
  
  import javax.annotation.PostConstruct;
  import javax.inject.Singleton;
  
  @Singleton
  public class PropertyLoader {
  
      @PostConstruct
      public void init() {
           System.out.println("PropertyLoader.init()");
      }
  }
  </code></pre>
  
  <p>Below is my applicationContext.xml</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="
   http://www.springframework.org/schema/beans 
   http://www.springframework.org/schema/beans/spring-beans.xsd 
   http://www.springframework.org/schema/context 
   http://www.springframework.org/schema/context/spring-context.xsd 
   http://www.springframework.org/schema/mvc 
   http://www.springframework.org/schema/mvc/spring-mvc.xsd 
   http://www.springframework.org/schema/tx 
   http://www.springframework.org/schema/tx/spring-tx.xsd 
   http://www.directwebremoting.org/schema/spring-dwr
   http://www.directwebremoting.org/schema/spring-dwr/spring-dwr-3.0.xsd"&gt;
  
  &lt;dwr:annotation-config /&gt;
  &lt;dwr:annotation-scan base-package="org.stalwartz" scanDataTransferObject="true" scanRemoteProxy="true" /&gt;
  &lt;dwr:url-mapping /&gt;
  
  &lt;!--  &lt;bean id="proeprtyLoader" class="org.stalwartz.config.PropertyLoader"&gt;&lt;/bean&gt;  --&gt;
  
  &lt;dwr:controller id="dwrController" debug="false"&gt;
      &lt;dwr:config-param name="activeReverseAjaxEnabled" value="true" /&gt;
  &lt;/dwr:controller&gt;
  
  &lt;context:annotation-config&gt;
      &lt;context:component-scan base-package="org.stalwartz" annotation-config="true"&gt;&lt;/context:component-scan&gt;
  &lt;/context:annotation-config&gt;
  
  &lt;mvc:annotation-driven /&gt;
  ...
  ...
  ...
  &lt;/beans&gt;
  </code></pre>
  
  <p>Looks simple, but it does not work without uncommenting bean declaration. </p>