Spring ApplicationContextAware Example

Spring provides ApplicationContextAware interface to get the ApplicationContext anywhere in our code. In order to get this feature we need to implement ApplicationContextAware interface in our beans and override setApplicationContext method.