diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java index d175a4411e..1bca023f12 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java @@ -129,10 +129,11 @@ public CachingGrailsConventionGroovyPageLocator groovyPageLocator(ObjectProvider defaultViews = resourceLoader.getResource("classpath:gsp/views.properties"); } if (defaultViews.exists()) { - PropertiesFactoryBean pfb = new PropertiesFactoryBean(); - pfb.setIgnoreResourceNotFound(true); - pfb.setLocation(defaultViews); try { + PropertiesFactoryBean pfb = new PropertiesFactoryBean(); + pfb.setIgnoreResourceNotFound(true); + pfb.setLocation(defaultViews); + pfb.afterPropertiesSet(); Map precompiledGspMap = new HashMap<>(); CollectionUtils.mergePropertiesIntoMap(pfb.getObject(), precompiledGspMap); groovyPageLocator.setPrecompiledGspMap(precompiledGspMap);