public class GroovyMarkupViewResolver extends AbstractTemplateViewResolver
AbstractTemplateViewResolver
that supports
GroovyMarkupView
(i.e. Groovy XML/XHTML markup templates) and
custom subclasses of it.
The view class for all views created by this resolver can be specified
via UrlBasedViewResolver.setViewClass(Class)
.
Note: When chaining ViewResolvers this resolver will check for the
existence of the specified template resources and only return a non-null
View
object if a template is actually found.
GroovyMarkupConfigurer
AbstractCachingViewResolver.CacheFilter
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
DEFAULT_CACHE_LIMIT
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
GroovyMarkupViewResolver()
|
GroovyMarkupViewResolver(String prefix,
String suffix)
|
Modifier and Type | Method and Description |
---|---|
protected Object |
getCacheKey(String viewName,
Locale locale)
This resolver supports i18n, so cache keys should contain the locale.
|
protected AbstractUrlBasedView |
instantiateView()
Instantiate the specified view class.
|
protected Class<?> |
requiredViewClass()
Return the required type of view for this resolver.
|
buildView, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
applyLifecycleMethods, canHandle, createView, getAttributesMap, 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, getCacheFilter, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheFilter, setCacheLimit, setCacheUnresolved
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
public GroovyMarkupViewResolver()
public GroovyMarkupViewResolver(String prefix, String suffix)
prefix
and suffix
as constructor arguments.prefix
- the prefix that gets prepended to view names when building a URLsuffix
- the suffix that gets appended to view names when building a URLprotected Class<?> requiredViewClass()
UrlBasedViewResolver
AbstractUrlBasedView
.requiredViewClass
in class AbstractTemplateViewResolver
UrlBasedViewResolver.instantiateView()
,
AbstractUrlBasedView
protected AbstractUrlBasedView instantiateView()
UrlBasedViewResolver
The default implementation uses reflection to instantiate the class.
instantiateView
in class UrlBasedViewResolver
UrlBasedViewResolver.setViewClass(java.lang.Class<?>)
protected Object getCacheKey(String viewName, Locale locale)
getCacheKey
in class UrlBasedViewResolver