From d5c52e90489e30fc009d2cc5853be69b498403ae Mon Sep 17 00:00:00 2001 From: rproserpio <48475312+rproserpio@users.noreply.github.com> Date: Sun, 13 Aug 2023 14:50:14 +0200 Subject: [VELOCITY-974] Use non-deprecated config property for resource loaders in VelocityEngineFactory Since 2.1 the key `resource.loader` has been deprecated in favor of `resource.loaders`. This closes #36 --- .../main/java/org/apache/velocity/spring/VelocityEngineFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-velocity-support/src/main/java/org/apache/velocity/spring/VelocityEngineFactory.java b/spring-velocity-support/src/main/java/org/apache/velocity/spring/VelocityEngineFactory.java index e2ecda6f..b1c062da 100644 --- a/spring-velocity-support/src/main/java/org/apache/velocity/spring/VelocityEngineFactory.java +++ b/spring-velocity-support/src/main/java/org/apache/velocity/spring/VelocityEngineFactory.java @@ -276,7 +276,7 @@ public class VelocityEngineFactory { resolvedPath.append(','); } } - velocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, "file"); + velocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADERS, "file"); velocityEngine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_CACHE, "true"); velocityEngine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, resolvedPath.toString()); } @@ -308,7 +308,7 @@ public class VelocityEngineFactory { */ protected void initSpringResourceLoader(VelocityEngine velocityEngine, String resourceLoaderPath) { velocityEngine.setProperty( - RuntimeConstants.RESOURCE_LOADER, SpringResourceLoader.NAME); + RuntimeConstants.RESOURCE_LOADERS, SpringResourceLoader.NAME); velocityEngine.setProperty( SpringResourceLoader.SPRING_RESOURCE_LOADER_CLASS, SpringResourceLoader.class.getName()); velocityEngine.setProperty( -- cgit v1.2.3