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

    Constructors
    Constructor
    Description
    Create a MustacheViewResolver backed by a default instance of a Mustache.Compiler.
    MustacheViewResolver(com.samskivert.mustache.Mustache.Compiler compiler)
    Create a MustacheViewResolver backed by a custom instance of a Mustache.Compiler.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MustacheViewResolver

      public MustacheViewResolver()
      Create a MustacheViewResolver backed by a default instance of a Mustache.Compiler.
    • MustacheViewResolver

      public MustacheViewResolver(com.samskivert.mustache.Mustache.Compiler compiler)
      Create a MustacheViewResolver backed by a custom instance of a Mustache.Compiler.
      Parameters:
      compiler - the Mustache compiler used to compile templates
  • Method Details

    • setCharset

      public void setCharset(String charset)
      Set the charset.
      Parameters:
      charset - the charset
    • requiredViewClass

      protected Class<?> requiredViewClass()
      Overrides:
      requiredViewClass in class org.springframework.web.reactive.result.view.UrlBasedViewResolver
    • createView

      protected org.springframework.web.reactive.result.view.AbstractUrlBasedView createView(String viewName)
      Overrides:
      createView in class org.springframework.web.reactive.result.view.UrlBasedViewResolver
    • instantiateView

      protected org.springframework.web.reactive.result.view.AbstractUrlBasedView instantiateView()
      Overrides:
      instantiateView in class org.springframework.web.reactive.result.view.UrlBasedViewResolver