类 MustacheView

  • 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View

    public class MustacheView
    extends org.springframework.web.servlet.view.AbstractTemplateView
    Spring MVC View using the Mustache template engine.
    从以下版本开始:
    2.0.0
    • 字段概要

      • 从类继承的字段 org.springframework.web.servlet.view.AbstractTemplateView

        SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE
      • 从类继承的字段 org.springframework.web.servlet.view.AbstractView

        DEFAULT_CONTENT_TYPE
      • 从类继承的字段 org.springframework.context.support.ApplicationObjectSupport

        logger
      • 从接口继承的字段 org.springframework.web.servlet.View

        PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      booleancheckResource​(Locale locale) 
      protected voidrenderMergedTemplateModel​(Map<String,​Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.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.
      • 从类继承的方法 org.springframework.web.servlet.view.AbstractTemplateView

        applyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
      • 从类继承的方法 org.springframework.web.servlet.view.AbstractUrlBasedView

        afterPropertiesSet, getUrl, isUrlRequired, setUrl, toString
      • 从类继承的方法 org.springframework.web.servlet.view.AbstractView

        addStaticAttribute, 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, writeToResponse
      • 从类继承的方法 org.springframework.web.context.support.WebApplicationObjectSupport

        getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
      • 从类继承的方法 org.springframework.context.support.ApplicationObjectSupport

        getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
    • 方法详细资料

      • setCompiler

        public 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.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
      • checkResource

        public boolean checkResource​(Locale locale)
                              throws Exception
        覆盖:
        checkResource 在类中 org.springframework.web.servlet.view.AbstractUrlBasedView
        抛出:
        Exception
      • renderMergedTemplateModel

        protected void renderMergedTemplateModel​(Map<String,​Object> model,
                                                 javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response)
                                          throws Exception
        指定者:
        renderMergedTemplateModel 在类中 org.springframework.web.servlet.view.AbstractTemplateView
        抛出:
        Exception