Starting with spring boot initializer project :
https://start.spring.io/#!type=gradle-project&language=kotlin&platformVersion=2.4.0.RELEASE&packaging=jar&jvmVersion=11&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=devtools,web,mustache

-> Gradle, Kotlin, Spring Boot 2.4.0. Mustache

I needed to configure
spring.mustache.enabled=true to get templating working with @Controller and @GetMapping

According to https://docs.spring.io/spring-boot/docs/2.4.0/reference/htmlsingle/#spring.mustache.enabled this should not be necessary.

Comment From: wilkinsona

We have a smoke test for Mustache and Spring MVC that does not set the spring.mustache.enabled property and works as expected. Also, looking at the code, I can't see the property being used anywhere. If anything, I'd expect us to have the opposite problem in that setting it to false doesn't switch anything off. In short, I don't understand why things are behaving as you have described.

To help us get to the bottom of this, can you please provide a complete yet minimal sample that reproduces the problem? You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: 726D

I did a minimal setup from scratch an I can't reproduce the problem. Sorry for the unnecessary work I triggered and thanks for your clear answer.

Comment From: snicoll

Thanks for letting us know.