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

BeanNameAware , MessageSourceAware and ResourceLoaderAware

Bean implementing BeanNameAware interface can get its name defined in the Spring container. Bean implementing MessageSourceAware interface can get the access to message source object which is used to achieve internationalization Bean implementing ResourceLoaderAware interface can load the resources from the classpath or any external file. Let’s write a class which implements the above interfaces […]

Share this article on
< Previous Next >