Package io.micronaut.views.jte
Class JteViewsRendererConfigurationProperties
java.lang.Object
io.micronaut.views.jte.JteViewsRendererConfigurationProperties
- All Implemented Interfaces:
JteViewsRendererConfiguration
@ConfigurationProperties("micronaut.views.jte")
public final class JteViewsRendererConfigurationProperties
extends Object
implements JteViewsRendererConfiguration
ConfigurationProperties for JTE.
- Since:
- 3.1.0
- Author:
- edward3h
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionWhen using dynamic templates, the root directory to write generated source and classes under.When using dynamic templates, the root source directory to search.boolean
When using dynamic templates, build them with binary content (see jte Binary Rendering docs).boolean
Use dynamic/hot reload templates.void
setBinaryStaticContent
(boolean binaryStaticContent) Enable building binary content for templates.void
setDynamic
(boolean dynamic) Whether to enable dynamic reloading of templates.void
setDynamicPath
(String path) Root directory under which to write generated source and class files.void
setDynamicSourcePath
(String path) When using dynamic templates, the root source directory to search.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_DYNAMIC
public static final boolean DEFAULT_DYNAMICThe default dynamic value.- See Also:
-
DEFAULT_DYNAMIC_PATH
The default dynamic value.- See Also:
-
DEFAULT_BINARY_STATIC_CONTENT
public static final boolean DEFAULT_BINARY_STATIC_CONTENT- See Also:
-
-
Constructor Details
-
JteViewsRendererConfigurationProperties
public JteViewsRendererConfigurationProperties()
-
-
Method Details
-
setDynamic
public void setDynamic(boolean dynamic) Whether to enable dynamic reloading of templates. Default value (false).- Parameters:
dynamic
- true to enable dynamic reloading
-
isDynamic
public boolean isDynamic()Description copied from interface:JteViewsRendererConfiguration
Use dynamic/hot reload templates.- Specified by:
isDynamic
in interfaceJteViewsRendererConfiguration
- Returns:
- true to enable reloading templates.
-
setDynamicPath
Root directory under which to write generated source and class files. . Default value ("build/jte-classes").- Parameters:
path
- the directory
-
getDynamicPath
Description copied from interface:JteViewsRendererConfiguration
When using dynamic templates, the root directory to write generated source and classes under.- Specified by:
getDynamicPath
in interfaceJteViewsRendererConfiguration
- Returns:
- the directory
-
getDynamicSourcePath
Description copied from interface:JteViewsRendererConfiguration
When using dynamic templates, the root source directory to search. If not specified, jte will search src/main/jte and src/main/resources/<folder> where folder is ViewsConfiguration.getFolder().- Specified by:
getDynamicSourcePath
in interfaceJteViewsRendererConfiguration
- Returns:
- the directory
-
setDynamicSourcePath
When using dynamic templates, the root source directory to search. If not specified, jte will search src/<sourceset>/jte and src/<sourceset>/resources/<folder> where 'folder' is ViewsConfiguration.getFolder(). In cases where the source directory cannot be found, jte will use classpath loading instead, and will not dynamically reload templates.- Parameters:
path
- the directory
-
isBinaryStaticContent
public boolean isBinaryStaticContent()Description copied from interface:JteViewsRendererConfiguration
When using dynamic templates, build them with binary content (see jte Binary Rendering docs). (When using precompiled templates, this setting is determined by the build configuration.)- Specified by:
isBinaryStaticContent
in interfaceJteViewsRendererConfiguration
- Returns:
- true to enable building binary content
-
setBinaryStaticContent
public void setBinaryStaticContent(boolean binaryStaticContent) Enable building binary content for templates. Default value (false). (Only has an effect when 'dynamic' is true. To use with precompiled templates, enable it in the build plugin)- Parameters:
binaryStaticContent
- true to enable binary content
-