@Produces(value="text/html") @Requires(property="micronaut.views.freemarker.enabled",notEquals="false") @Requires(classes=freemarker.template.Configuration.class) @Singleton public class FreemarkerViewsRenderer extends Object implements ViewsRenderer
Modifier and Type | Field and Description |
---|---|
protected String |
extension |
protected freemarker.template.Configuration |
freemarkerConfiguration |
protected FreemarkerViewsRendererConfigurationProperties |
freemarkerMicronautConfiguration |
protected ViewsConfiguration |
viewsConfiguration |
EXTENSION_SEPARATOR, FILE_SEPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String view) |
Writable |
render(String viewName,
Object data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
modelOf, normalizeFile, normalizeFolder, render
protected final ViewsConfiguration viewsConfiguration
protected final FreemarkerViewsRendererConfigurationProperties freemarkerMicronautConfiguration
protected final freemarker.template.Configuration freemarkerConfiguration
protected final String extension
@Nonnull public Writable render(@Nonnull String viewName, @Nullable Object data)
render
in interface ViewsRenderer
viewName
- view name to be renderdata
- response body to render it with a viewpublic boolean exists(@Nonnull String view)
exists
in interface ViewsRenderer
view
- view name to be render