public class FreeMarkerViewResolver extends AbstractTemplateViewResolver
UrlBasedViewResolver
that supports FreeMarkerView
(i.e. FreeMarker templates) and custom subclasses of it.
The view class for all views generated by this resolver can be specified via the "viewClass" property. See UrlBasedViewResolver's javadoc for details.
Note: When chaining ViewResolvers, a FreeMarkerViewResolver will check for the existence of the specified template resources and only return a non-null View object if the template was actually found.
UrlBasedViewResolver.setViewClass(java.lang.Class<?>)
,
UrlBasedViewResolver.setPrefix(java.lang.String)
,
UrlBasedViewResolver.setSuffix(java.lang.String)
,
UrlBasedViewResolver.setRequestContextAttribute(java.lang.String)
,
AbstractTemplateViewResolver.setExposeSpringMacroHelpers(boolean)
,
FreeMarkerView
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
DEFAULT_CACHE_LIMIT
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
FreeMarkerViewResolver()
|
FreeMarkerViewResolver(String prefix,
String suffix)
|
Modifier and Type | Method and Description |
---|---|
protected Class<?> |
requiredViewClass()
Requires
FreeMarkerView . |
buildView, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
applyLifecycleMethods, canHandle, createView, getAttributesMap, getCacheKey, getContentType, getExposeContextBeansAsAttributes, getExposedContextBeanNames, getExposePathVariables, getOrder, getPrefix, getRedirectHosts, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHosts, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames
clearCache, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheLimit, setCacheUnresolved
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
protected Class<?> requiredViewClass()
FreeMarkerView
.requiredViewClass
in class AbstractTemplateViewResolver
AbstractUrlBasedView