Class FreeMarkerViewResolver
java.lang.Object
org.springframework.web.reactive.result.view.ViewResolverSupport
org.springframework.web.reactive.result.view.UrlBasedViewResolver
org.springframework.web.reactive.result.view.freemarker.FreeMarkerViewResolver
- All Implemented Interfaces:
Aware
,InitializingBean
,ApplicationContextAware
,Ordered
,ViewResolver
A
ViewResolver
for resolving FreeMarkerView
instances, 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
for details.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
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
ConstructorDescriptionSimple constructor.FreeMarkerViewResolver
(String prefix, String suffix) Convenience constructor with a prefix and suffix. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractUrlBasedView
Instantiate the specified view class.protected Class<?>
RequiresFreeMarkerView
.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
-
FreeMarkerViewResolver
public FreeMarkerViewResolver()Simple constructor. -
FreeMarkerViewResolver
Convenience constructor with a prefix and suffix.- Parameters:
suffix
- the suffix to prepend view names withprefix
- the prefix to prepend view names with
-
-
Method Details
-
requiredViewClass
RequiresFreeMarkerView
.- 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:
-