Skip to content

Commit f2c6370

Browse files
committed
Change default file extension for Mustache templates
This commit changes the default file extension for Mustache templates, from `.html` to `.mustache`, which is the file extension used in the official reference documentation and by most IDE plugins. Fixes gh-8997
1 parent 4d5dcca commit f2c6370

File tree

5 files changed

+2
-2
lines changed

5 files changed

+2
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class MustacheProperties extends AbstractTemplateViewResolverProperties {
3030

3131
public static final String DEFAULT_PREFIX = "classpath:/templates/";
3232

33-
public static final String DEFAULT_SUFFIX = ".html";
33+
public static final String DEFAULT_SUFFIX = ".mustache";
3434

3535
/**
3636
* Prefix to apply to template names.

spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ content into your application; rather pick only the properties that you need.
372372
spring.mustache.expose-spring-macro-helpers= # Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".
373373
spring.mustache.prefix=classpath:/templates/ # Prefix to apply to template names.
374374
spring.mustache.request-context-attribute= # Name of the RequestContext attribute for all views.
375-
spring.mustache.suffix=.html # Suffix to apply to template names.
375+
spring.mustache.suffix=.mustache # Suffix to apply to template names.
376376
spring.mustache.view-names= # White list of view names that can be resolved.
377377
378378
# SPRING MVC ({sc-spring-boot-autoconfigure}/web/WebMvcProperties.{sc-ext}[WebMvcProperties])

0 commit comments

Comments
 (0)