Uses Springs ViewResolver design concepts. The primary lookup uses ViewResourceLocator The main DispatcherServlet spins through and calls the ViewResolvers ViewResolver.resolveViewName(String viewName, Locale locale) The inheritance chain here is FreeMarkerViewResolver -> AbstractTemplateViewResolver -> UrlBasedViewResolver -> AbstractCachingViewResolver AbstractCachingViewResolver holds the resolveViewName() which calls createView() then loadView() and buildView() This uses the ViewResourceLocator to locate the resource This gets used simply by registering it as a spring bean jasperViewResolver(JasperViewResolver){ viewResourceLocator = ref("viewResourceLocator") jdbcDataSource = ref("dataSource") reportDataKey = "datasource" viewNames = ["*.jasper","*.jrxml"] as String[] viewClass = JasperReportsMultiFormatView.class order = 20 }
Fields inherited from class | Fields |
---|---|
class UrlBasedViewResolver |
REDIRECT_URL_PREFIX, FORWARD_URL_PREFIX, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE, DEFAULT_CACHE_LIMIT |
class AbstractCachingViewResolver |
DEFAULT_CACHE_LIMIT |
Type | Name and description |
---|---|
Closure |
buildViewClosure |
ResourceLoader |
viewResourceLoader |
Type Params | Return Type | Name and description |
---|---|---|
|
protected AbstractUrlBasedView |
buildView(String viewName) |
|
protected View |
loadView(String viewName, Locale locale) AbstractCachingViewResolver calls this if it doesn't get a hit on the cache Most of the calls to this will look like "/reports/xxx.xyz" etc.. |
AbstractCachingViewResolver calls this if it doesn't get a hit on the cache Most of the calls to this will look like "/reports/xxx.xyz" etc..