@MetaInfServices(value=io.higgs.http.server.transformers.ResponseTransformer.class) public class ThymeleafTransformer extends BaseTransformer
template.value() for a list of types that will be injected by default| Modifier and Type | Field and Description |
|---|---|
protected TemplateConfig |
config |
protected Thymeleaf |
tl |
priority, supportedTypes| Constructor and Description |
|---|
ThymeleafTransformer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canTransform(Object response,
HttpRequest request,
MediaType mediaType,
HttpMethod method,
io.netty.channel.ChannelHandlerContext ctx) |
protected String |
determineErrorTemplate(HttpResponse res,
Object response) |
TemplateConfig |
getConfig() |
org.thymeleaf.TemplateEngine |
getTemplateEngine()
Get the Thymeleaf template engine which can be used configured further.
|
ThymeleafTransformer |
instance() |
void |
transform(Object response,
HttpRequest request,
HttpResponse res,
MediaType mediaType,
HttpMethod method,
io.netty.channel.ChannelHandlerContext ctx) |
addSupportedTypes, compareTo, determineErrorStatus, isError, isStaticFileResponse, mediaTypeMatches, priority, setPriority, setResponseContentprotected TemplateConfig config
protected Thymeleaf tl
public boolean canTransform(Object response, HttpRequest request, MediaType mediaType, HttpMethod method, io.netty.channel.ChannelHandlerContext ctx)
canTransform in interface ResponseTransformercanTransform in class BaseTransformerpublic void transform(Object response, HttpRequest request, HttpResponse res, MediaType mediaType, HttpMethod method, io.netty.channel.ChannelHandlerContext ctx)
public ThymeleafTransformer instance()
protected String determineErrorTemplate(HttpResponse res, Object response)
public TemplateConfig getConfig()
public org.thymeleaf.TemplateEngine getTemplateEngine()
Copyright © 2012-2015. All Rights Reserved.