Monthly Archives: May 2012

Get application context in Spring Web project

To get access to appContext, just extends your class from WebApplicationObjectSupport and use:

ISome some = null;
try
{
some= (ISome)getApplicationContext().getBean("Some");
}
catch (Exception e)
{
logger.debug("Some is not defined in AppContext.");
}