Class TemplateInterceptor

All Implemented Interfaces:
Interceptor

public class TemplateInterceptor extends StaticInterceptor
Description
Renders the body content of a message from a template. The template can produce plain text, Json or XML. Variables in the template are substituted with values from the body, header, query parameters, etc. If the extension of a referenced template file is .xml it will use XMLTemplateEngine otherwise StreamingTemplateEngine. Have a look at the samples in examples/template.
Topic
4. Interceptors/Features
  • Field Details

    • template

      protected groovy.text.Template template
  • Constructor Details

    • TemplateInterceptor

      public TemplateInterceptor()
  • Method Details