A common mistake is to use BeanFactory instead of ApplicationContext, without realizing what BeanFactory doesn't do for you. To quote the Spring reference manual:
It is important to know that a BeanFactory treats bean post-processors slightly differently than an ApplicationContext. An ApplicationContext will automatically detect any beans which are deployed into it which implement the BeanPostProcessor interface, and register them as post-processors, to be then called appropriately by the factory on bean creation. Nothing else needs to be done other than deploying the post-processor in a similar fashion to any other bean. On the other hand, when using plain BeanFactories, bean post-processors have to manually be explicitly registered [...]
You probably have code that looks something like this:
Code:
Resource res = new ClassPathResource("/springldap.xml");
BeanFactory context = new XmlBeanFactory(res);
If you want to have the PropertyPlaceholderConfigurer registered for you, write this instead:
Code:
ApplicationContext context = new ClassPathXmlApplicationContext("/springldap.xml");