diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 2326133fd7..6776e8bad4 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1414,6 +1414,15 @@ for example: ---- +To avoid a warning message about the HTML 5 template mode being deprecated and the HTML +template mode being used instead, you may also want to explicity configure +`spring.thymeleaf.mode` to be `HTML`, for example: + +[source,properties,indent=0,subs="verbatim,quotes,attributes"] +---- + spring.thymeleaf.mode: HTML +---- + Please refer to the {github-code}/spring-boot-samples/spring-boot-sample-web-thymeleaf3[Thymeleaf 3 sample] to see this in action. diff --git a/spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/application.properties index d1abb40803..5a5198ce2a 100644 --- a/spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/application.properties @@ -1,2 +1,3 @@ # Allow Thymeleaf templates to be reloaded at dev time spring.thymeleaf.cache: false +spring.thymeleaf.mode: html