Class MustacheView
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.springframework.web.servlet.view.AbstractUrlBasedView
org.springframework.web.servlet.view.AbstractTemplateView
org.springframework.boot.web.servlet.view.MustacheView
- All Implemented Interfaces:
- Aware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ServletContextAware,- View
Spring MVC 
View using the Mustache template engine.- Since:
- 2.0.0
- Author:
- Brian Clozel, Dave Syer, Phillip Webb
- 
Field SummaryFields inherited from class org.springframework.web.servlet.view.AbstractTemplateViewSPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTEFields inherited from class org.springframework.web.servlet.view.AbstractViewDEFAULT_CONTENT_TYPEFields inherited from class org.springframework.context.support.ApplicationObjectSupportloggerFields inherited from interface org.springframework.web.servlet.ViewPATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancheckResource(Locale locale) protected voidrenderMergedTemplateModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) voidsetCharset(String charset) Set the charset used for reading Mustache template files.voidsetCompiler(com.samskivert.mustache.Mustache.Compiler compiler) Set the Mustache compiler to be used by this view.Methods inherited from class org.springframework.web.servlet.view.AbstractTemplateViewapplyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpersMethods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedViewafterPropertiesSet, getUrl, isUrlRequired, setUrl, toStringMethods inherited from class org.springframework.web.servlet.view.AbstractViewaddStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponseMethods inherited from class org.springframework.web.context.support.WebApplicationObjectSupportgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextMethods inherited from class org.springframework.context.support.ApplicationObjectSupportgetApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
- 
Constructor Details- 
MustacheViewpublic MustacheView()
 
- 
- 
Method Details- 
setCompilerpublic void setCompiler(com.samskivert.mustache.Mustache.Compiler compiler) Set the Mustache compiler to be used by this view.Typically this property is not set directly. Instead a single Mustache.Compileris expected in the Spring application context which is used to compile Mustache templates.- Parameters:
- compiler- the Mustache compiler
 
- 
setCharsetSet the charset used for reading Mustache template files.- Parameters:
- charset- the charset to use for reading template files
 
- 
checkResource- Overrides:
- checkResourcein class- AbstractUrlBasedView
- Throws:
- Exception
 
- 
renderMergedTemplateModelprotected void renderMergedTemplateModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception- Specified by:
- renderMergedTemplateModelin class- AbstractTemplateView
- Throws:
- Exception
 
 
-