Spring context:annotation-config

In our previous examples we have to define a bean for each BeanPostProcessor we wanted to use. Spring provides a shortcut to do this in the context namespace. We simply need to add the context namespace to our declared namespaces at the top of our config xml file and add the context:annotation-config to our bean … Continue reading Spring context:annotation-config


What is it for? Execute a block of code for each and every bean that is initialised. Bean Post Processor is a separate class Spring executes the code in the Post Processor after initializing each and every bean Example Print the Name of Every Bean that is Initialized DisplayNameBeanPostProcessor Register the BeanPostProcessor with Spring Spring.xml