A webapp made with Spring Boot using Thymeleaf and Thymeleaf Layout Dialect.
The goal is to allow the use of a layout resource not localized in the classpath (like usual): on an HTTP server.
- The remote HTTP server configured is the webserver of IntelliJ IDEA in this URL:
http://localhost:63342/thymeleaf-aggregator-poc/src/main/resources/cms/layout.html
- An other version of the layout is available in classpath, as a fallback, in the folder
/src/main/resources/templates
:classpath:/src/main/resources/templates/cms/layout.html
.
- Go to http://localhost:8080/decorate
- If page title is "This page uses the HTTP layout": it found the layout on
http://localhost:63342/thymeleaf-aggregator-poc/src/main/resources/cms/layout.html
. - If page title is "This page uses the classpath layout": it does not found the layout on
http://localhost:63342/thymeleaf-aggregator-poc/src/main/resources/cms/layout.html
and usedclasspath:/src/main/resources/templates/cms/layout.html
instead.