@PostConstruct and @PreDestroy Annotations

These annotations are introduced in Spring 2.5 to call the bean life cycle methods just like init and destroy methods. @PostConstruct : is called after the bean has been initialized and before this bean is returned to the requested object. @PreDestroy : is called just before the bean is removed from the container Create a […]

Share this article on

Spring Aware Interfaces for beans

Sometimes it is required that our beans needs to get some information about Spring container and its resources. For example, sometime bean need to know the current Application Context using which it can perform some operations like loading specific bean from the container in a programmatic way. So to make the beans aware about this, […]

Share this article on
< Previous Next >