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 955d8d4cf71..cf5bf6ae3c9 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()); + } + }