Class ScriptTemplateViewResolver
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractCachingViewResolver
org.springframework.web.servlet.view.UrlBasedViewResolver
org.springframework.web.servlet.view.script.ScriptTemplateViewResolver
- All Implemented Interfaces:
Aware
,ApplicationContextAware
,Ordered
,ServletContextAware
,ViewResolver
Convenience subclass of
UrlBasedViewResolver
that supports
ScriptTemplateView
and custom subclasses of it.
The view class for all views created by this resolver can be specified
via the UrlBasedViewResolver.setViewClass(Class)
property.
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.
- Since:
- 4.2
- Author:
- Sebastien Deleuze
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
AbstractCachingViewResolver.CacheFilter
-
Field Summary
Fields inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
Fields inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
DEFAULT_CACHE_LIMIT
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractUrlBasedView
Instantiate the specified view class.protected Class<?>
Return the required type of view for this resolver.Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
applyLifecycleMethods, buildView, 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
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, getCacheFilter, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheFilter, setCacheLimit, setCacheUnresolved
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Constructor Details
-
ScriptTemplateViewResolver
public ScriptTemplateViewResolver() -
ScriptTemplateViewResolver
- Parameters:
prefix
- the prefix that gets prepended to view names when building a URLsuffix
- the suffix that gets appended to view names when building a URL- Since:
- 4.3
-
-
Method Details
-
requiredViewClass
Description copied from class:UrlBasedViewResolver
Return the required type of view for this resolver. This implementation returnsAbstractUrlBasedView
.- Overrides:
requiredViewClass
in classUrlBasedViewResolver
- See Also:
-
instantiateView
Description copied from class:UrlBasedViewResolver
Instantiate the specified view class.The default implementation uses reflection to instantiate the class.
- Overrides:
instantiateView
in classUrlBasedViewResolver
- Returns:
- a new instance of the view class
- See Also:
-