Thymeleaf Hot Reload
DebugTools 5.3.0 supports Thymeleaf template hot reload. The plugin clears the current template's cache before rendering, allowing subsequent requests to read updated content.
Enable and Verify
- Start the application with
Hotswap 'application' with DebugTools, or preload the Agent as described in Hot Deploy. - Make sure
Thymeleafis not selected inSettings | DebugTools | Hot Reload | Disable Plugin. - Request a Thymeleaf page once.
- Edit a template such as
src/main/resources/templates/thymeleaf.html. - Use
Copy 'thymeleaf.html' to targetto update local output, orDeploy 'thymeleaf.html' to remotefor a remote target. - Request the page again and check that the changes took effect.
See Resource File Hot Reload and Deployment for the steps. After cache clearing, the application must still read the new file from the path used by its template resolver. Saving a source file alone does not replace a template inside a JAR.
Changing Java Code and Templates Together
If you also change a Controller, Service, or Java object used by the template, update the Java compilation output and trigger class hot reload, then update the template resource. Template cache clearing does not replace Java class redefinition.
TIP
- The plugin declares Thymeleaf
3.0.15as its tested version. Verify other versions with your application. - This feature applies to the
TemplateManager.parseAndProcessrendering path. Verify whether custom rendering flows use that entry point. - If a template stays unchanged, check the template resolver path, resource deployment directory, and default ClassLoader. Browser or proxy caches may also affect the displayed result.