diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheViewResolver.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheViewResolver.java index 955d8d4cf7..1a221c4bfe 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheViewResolver.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheViewResolver.java @@ -75,4 +75,9 @@ public class MustacheViewResolver extends AbstractTemplateViewResolver { return view; } + @Override + protected AbstractUrlBasedView instantiateView() { + return (getViewClass() == MustacheView.class) ? new MustacheView() : super.instantiateView(); + } + }