Class ScriptTemplateViewResolver
java.lang.Object
org.springframework.web.reactive.result.view.ViewResolverSupport
org.springframework.web.reactive.result.view.UrlBasedViewResolver
org.springframework.web.reactive.result.view.script.ScriptTemplateViewResolver
- All Implemented Interfaces:
Aware
,InitializingBean
,ApplicationContextAware
,Ordered
,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:
- 5.0
- Author:
- Sebastien Deleuze
- See Also:
-
Field Summary
Fields inherited from class org.springframework.web.reactive.result.view.UrlBasedViewResolver
REDIRECT_URL_PREFIX
Fields inherited from class org.springframework.web.reactive.result.view.ViewResolverSupport
DEFAULT_CONTENT_TYPE
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.reactive.result.view.UrlBasedViewResolver
afterPropertiesSet, applyLifecycleMethods, canHandle, createView, getApplicationContext, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, resolveViewName, setApplicationContext, setPrefix, setRedirectViewProvider, setRequestContextAttribute, setSuffix, setViewClass, setViewNames
Methods inherited from class org.springframework.web.reactive.result.view.ViewResolverSupport
getDefaultCharset, getOrder, getSupportedMediaTypes, setDefaultCharset, setOrder, setSupportedMediaTypes
-
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
-
-
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:
-