Spring Boot Starter¶
This starter is compatible with Spring Boot 3.x!
Add required dependencies¶
Usage¶
The starter configures a org.springframework.web.servlet.ViewResolver
and a jte Template engine. Now you can return a string, pointing to template file name and the resolver will take care to instantiate the view and render the template.
Info
By default, the templates are expected at src/main/jte
.
You can use it with Spring WebMVC as well as with Spring WebFlux.
Configuration¶
By default, the template files are expected in src/main/jte
, You can also set the templateSuffix of your jte templates
Development¶
If you set developmentMode = true
the jte file watcher will watch for changes in templates and recompile them.
Warning
This only works with a JDK!
Production¶
To use precompiled Templates in production, for use with a JRE environment, you need to configure the Maven/Gradle Plugin to precompile your templates: