类 MustacheView
- java.lang.Object
- org.springframework.web.reactive.result.view.AbstractView
- org.springframework.web.reactive.result.view.AbstractUrlBasedView
- org.springframework.boot.web.reactive.result.view.MustacheView
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.web.reactive.result.view.View
public class MustacheView extends org.springframework.web.reactive.result.view.AbstractUrlBasedView
Spring WebFluxView
using the Mustache template engine.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 MustacheView()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
checkResourceExists(Locale locale)
protected reactor.core.publisher.Mono<Void>
renderInternal(Map<String,Object> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange)
void
setCharset(String charset)
Set the charset used for reading Mustache template files.void
setCompiler(com.samskivert.mustache.Mustache.Compiler compiler)
Set the JMustache compiler to be used by this view.从类继承的方法 org.springframework.web.reactive.result.view.AbstractUrlBasedView
afterPropertiesSet, getUrl, setUrl, toString
从类继承的方法 org.springframework.web.reactive.result.view.AbstractView
createRequestContext, formatViewName, getApplicationContext, getBeanName, getDefaultCharset, getModelAttributes, getRequestContextAttribute, getRequestDataValueProcessor, getSupportedMediaTypes, obtainApplicationContext, render, resolveAsyncAttributes, setApplicationContext, setBeanName, setDefaultCharset, setRequestContextAttribute, setSupportedMediaTypes
构造器详细资料
MustacheView
public MustacheView()
方法详细资料
setCompiler
public void setCompiler(com.samskivert.mustache.Mustache.Compiler compiler)
Set the JMustache compiler to be used by this view. Typically this property is not set directly. Instead a singleMustache.Compiler
is expected in the Spring application context which is used to compile Mustache templates.- 参数:
compiler
- the Mustache compiler
setCharset
public void setCharset(String charset)
Set the charset used for reading Mustache template files.- 参数:
charset
- the charset to use for reading template files
checkResourceExists
public boolean checkResourceExists(Locale locale) throws Exception
- 指定者:
checkResourceExists
在类中org.springframework.web.reactive.result.view.AbstractUrlBasedView
- 抛出:
Exception
renderInternal
protected reactor.core.publisher.Mono<Void> renderInternal(Map<String,Object> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange)
- 指定者:
renderInternal
在类中org.springframework.web.reactive.result.view.AbstractView