applicationContext

Spring Framework - Application Context - three ways to get to the application context

Spring Framework - Application Context - three ways to get to the application context

This article shows you three different ways how to get to the Spring Framework Application Context in your code. Summary (This is a repost of an older article I wrote in 2010). In searching Google for “Spring ApplicationContextAware”, you will come across a lot of recommendations and I also see a lot of folks continuing to complain saying that their setApplicationContext method does not get invoked. So to help clarify, I’m blogging a few notes in hope that it helps clarify how the context works.