Spring - Initializing a Spring Bean

It is often required to run some custom code on initialization of a Spring bean. e.g. to check for mandatory properties or establish initial connections. Spring provides a few constructs to initialize the beans after they are injected with the properties.