Class MustacheViewResolver
java.lang.Object
org.springframework.web.reactive.result.view.ViewResolverSupport
org.springframework.web.reactive.result.view.UrlBasedViewResolver
org.springframework.boot.web.reactive.result.view.MustacheViewResolver
- All Implemented Interfaces:
Aware
,InitializingBean
,ApplicationContextAware
,Ordered
,ViewResolver
Spring WebFlux
ViewResolver
for Mustache.- Since:
- 2.0.0
- Author:
- Brian Clozel, Marten Deinum
-
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
ConstructorDescriptionCreate aMustacheViewResolver
backed by a default instance of aMustache.Compiler
.MustacheViewResolver
(com.samskivert.mustache.Mustache.Compiler compiler) Create aMustacheViewResolver
backed by a custom instance of aMustache.Compiler
. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractUrlBasedView
createView
(String viewName) protected AbstractUrlBasedView
protected Class<?>
void
setCharset
(String charset) Set the charset.Methods inherited from class org.springframework.web.reactive.result.view.UrlBasedViewResolver
afterPropertiesSet, applyLifecycleMethods, canHandle, 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
-
MustacheViewResolver
public MustacheViewResolver()Create aMustacheViewResolver
backed by a default instance of aMustache.Compiler
. -
MustacheViewResolver
public MustacheViewResolver(com.samskivert.mustache.Mustache.Compiler compiler) Create aMustacheViewResolver
backed by a custom instance of aMustache.Compiler
.- Parameters:
compiler
- the Mustache compiler used to compile templates
-
-
Method Details
-
setCharset
Set the charset.- Parameters:
charset
- the charset
-
requiredViewClass
- Overrides:
requiredViewClass
in classUrlBasedViewResolver
-
createView
- Overrides:
createView
in classUrlBasedViewResolver
-
instantiateView
- Overrides:
instantiateView
in classUrlBasedViewResolver
-