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:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.core.Ordered
,org.springframework.web.reactive.result.view.ViewResolver
public class MustacheViewResolver
extends org.springframework.web.reactive.result.view.UrlBasedViewResolver
Spring WebFlux
ViewResolver
for Mustache.- Since:
- 2.0.0
-
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 org.springframework.web.reactive.result.view.AbstractUrlBasedView
createView
(String viewName) protected org.springframework.web.reactive.result.view.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 classorg.springframework.web.reactive.result.view.UrlBasedViewResolver
-
createView
protected org.springframework.web.reactive.result.view.AbstractUrlBasedView createView(String viewName) - Overrides:
createView
in classorg.springframework.web.reactive.result.view.UrlBasedViewResolver
-
instantiateView
protected org.springframework.web.reactive.result.view.AbstractUrlBasedView instantiateView()- Overrides:
instantiateView
in classorg.springframework.web.reactive.result.view.UrlBasedViewResolver
-