This commit is contained in:
Stephane Nicoll 2018-03-02 14:40:21 +01:00
parent 155c929316
commit bae16aad3b

View File

@ -91,8 +91,7 @@ public class InitializrAutoConfiguration {
@ConditionalOnMissingBean
public TemplateRenderer templateRenderer(Environment environment) {
Binder binder = Binder.get(environment);
boolean cache = binder.bind("spring.mustache.cache", Boolean.class)
.orElseGet(() -> true);
boolean cache = binder.bind("spring.mustache.cache", Boolean.class).orElse(true);
TemplateRenderer templateRenderer = new TemplateRenderer();
templateRenderer.setCache(cache);
return templateRenderer;