@Produces(value="text/html") @Requires(property="micronaut.views.velocity.enabled",notEquals="false") @Requires(classes=org.apache.velocity.app.VelocityEngine.class) @Singleton public class VelocityViewsRenderer extends Object implements ViewsRenderer
Modifier and Type | Field and Description |
---|---|
protected VelocityViewsRendererConfiguration |
velocityConfiguration |
protected org.apache.velocity.app.VelocityEngine |
velocityEngine |
protected ViewsConfiguration |
viewsConfiguration |
EXTENSION_SEPARATOR, FILE_SEPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String viewName) |
Writable |
render(String view,
Object data) |
protected final org.apache.velocity.app.VelocityEngine velocityEngine
protected final ViewsConfiguration viewsConfiguration
protected final VelocityViewsRendererConfiguration velocityConfiguration
public Writable render(String view, @Nullable Object data)
render
in interface ViewsRenderer
view
- view name to be renderdata
- response body to render it with a viewpublic boolean exists(String viewName)
exists
in interface ViewsRenderer
viewName
- view name to be render