Class HandlebarsViewsRenderer<T,R>
java.lang.Object
io.micronaut.views.AbstractViewsRenderer<T,R>
io.micronaut.views.handlebars.HandlebarsViewsRenderer<T,R>
- Type Parameters:
T- The model typeR- The request type
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, ViewsRenderer<T,R>
@Requires(property="micronaut.views.handlebars.enabled",notEquals="false") @Requires(classes=com.github.jknack.handlebars.Handlebars.class)
@Singleton
public class HandlebarsViewsRenderer<T,R>
extends AbstractViewsRenderer<T,R>
Renders Views with Handlebars.java.
- Since:
- 1.0
- Author:
- Sergio del Amo
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.github.jknack.handlebars.Handlebarsprotected HandlebarsViewsRendererConfigurationprotected final io.micronaut.core.io.ResourceLoaderprotected final ViewsConfigurationFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionHandlebarsViewsRenderer(ViewsConfiguration viewsConfiguration, io.micronaut.core.io.scan.ClassPathResourceLoader resourceLoader, HandlebarsViewsRendererConfiguration handlebarsViewsRendererConfiguration, com.github.jknack.handlebars.Handlebars handlebars) -
Method Summary
Methods inherited from class AbstractViewsRenderer
defaultExtension, exists, getTemplate, viewLocationWithExtension, viewLocationWithoutExtension, viewNameWithExtensionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Field Details
-
viewsConfiguration
-
resourceLoader
protected final io.micronaut.core.io.ResourceLoader resourceLoader -
handlebarsViewsRendererConfiguration
-
handlebars
protected com.github.jknack.handlebars.Handlebars handlebars
-
-
Constructor Details
-
HandlebarsViewsRenderer
@Inject public HandlebarsViewsRenderer(ViewsConfiguration viewsConfiguration, io.micronaut.core.io.scan.ClassPathResourceLoader resourceLoader, HandlebarsViewsRendererConfiguration handlebarsViewsRendererConfiguration, com.github.jknack.handlebars.Handlebars handlebars) - Parameters:
viewsConfiguration- Views ConfigurationresourceLoader- Resource LoaderhandlebarsViewsRendererConfiguration- Handlebars ViewRenderer Configuration.handlebars- Handlebars Engine
-
-
Method Details
-
render
-