diff options
author | rproserpio <48475312+rproserpio@users.noreply.github.com> | 2023-08-13 14:50:14 +0200 |
---|---|---|
committer | Michael Osipov <michaelo@apache.org> | 2024-02-10 19:01:35 +0100 |
commit | d5c52e90489e30fc009d2cc5853be69b498403ae (patch) | |
tree | c84677a5c463ce55aa5a0823d96786651ab2fbf4 | |
parent | 3e3bd70b28bba1f7073f33825837e4346f411272 (diff) | |
download | apache-velocity-engine-d5c52e90489e30fc009d2cc5853be69b498403ae.tar.gz |
[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
-rw-r--r-- | spring-velocity-support/src/main/java/org/apache/velocity/spring/VelocityEngineFactory.java | 4 |
1 files 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( |