Spring Framework ServletContextAware - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ServletContextAware class.

This code example shows how to use the following methods:setServletContext
	} 
 
	@Override 
	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { 
		if (getServletContext() != null && bean instanceof ServletContextAware) { 
			((ServletContextAware) bean).setServletContext(getServletContext()); 
		} 
		if (getServletConfig() != null && bean instanceof ServletConfigAware) { 
			((ServletConfigAware) bean).setServletConfig(getServletConfig()); 
		} 
		return bean; 
	} 
 
	@Override 
	public Object postProcessAfterInitialization(Object bean, String beanName) { 
		return bean; 
	} 
 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Spring Framework ServletContextAware Methods: