From 811d523211bb1ce9551a2273e8bd937a27e39be7 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 12 Apr 2017 18:06:37 +0200 Subject: [PATCH] FreeMarkerConfigurationFactory falls back to SpringTemplateLoader on any exception Issue: SPR-15445 (cherry picked from commit a55a0f2) --- .../ui/freemarker/FreeMarkerConfigurationFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java index 9cb27d2979..40dac4bbd8 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java +++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -342,7 +342,7 @@ public class FreeMarkerConfigurationFactory { } return new FileTemplateLoader(file); } - catch (IOException ex) { + catch (Exception ex) { if (logger.isDebugEnabled()) { logger.debug("Cannot resolve template loader path [" + templateLoaderPath + "] to [java.io.File]: using SpringTemplateLoader as fallback", ex);