diff --git a/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateAutoConfiguration.java b/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateAutoConfiguration.java index afc48d813a7..1e35fe31d99 100644 --- a/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateAutoConfiguration.java +++ b/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template/autoconfigure/GroovyTemplateAutoConfiguration.java @@ -114,7 +114,7 @@ public final class GroovyTemplateAutoConfiguration { GroovyMarkupConfigurer groovyMarkupConfigurer(ObjectProvider templateEngine, Environment environment) { GroovyMarkupConfigurer configurer = new GroovyMarkupConfigurer(); - PropertyMapper map = PropertyMapper.get(); + PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull(); map.from(this.properties::isAutoEscape).to(configurer::setAutoEscape); map.from(this.properties::isAutoIndent).to(configurer::setAutoIndent); map.from(this.properties::getAutoIndentString).to(configurer::setAutoIndentString);