All Implemented Interfaces:
Aware, BeanNameAware, InitializingBean, ApplicationContextAware, View

public class MustacheView extends AbstractUrlBasedView
Spring WebFlux View using the Mustache template engine.
Since:
2.0.0
Author:
Brian Clozel
  • Constructor Details

    • MustacheView

      public MustacheView()
  • Method Details

    • 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 single Mustache.Compiler is expected in the Spring application context which is used to compile Mustache templates.
      Parameters:
      compiler - the Mustache compiler
    • setCharset

      public void setCharset(String charset)
      Set the charset used for reading Mustache template files.
      Parameters:
      charset - the charset to use for reading template files
    • checkResourceExists

      public boolean checkResourceExists(Locale locale) throws Exception
      Specified by:
      checkResourceExists in class AbstractUrlBasedView
      Throws:
      Exception
    • renderInternal

      protected reactor.core.publisher.Mono<Void> renderInternal(Map<String,Object> model, MediaType contentType, ServerWebExchange exchange)
      Specified by:
      renderInternal in class AbstractView