getBean
protected <T> T getBean(HttpServletRequest request,
java.lang.String beanName,
java.lang.Class<T> beanType)
Helper method to lookup a spring bean in the context of a request. This should only be used to lookup beans that
are request scoped. The looked up bean is cached in the request attributes so it should not have a narrower scope
than request scope. This method should not be used for beans that could be injected into this bean.
- Type Parameters:
T - the expected type of the bean
- Parameters:
request - the current request
beanName - the name of the bean to lookup
beanType - the expected type of the bean
- Returns:
- the bean found or null