This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git
The following commit(s) were added to refs/heads/master by this push:
new d5c52e90 [VELOCITY-974] Use non-deprecated config property for
resource loaders in VelocityEngineFactory
d5c52e90 is described below
commit d5c52e90489e30fc009d2cc5853be69b498403ae
Author: rproserpio <[email protected]>
AuthorDate: Sun Aug 13 14:50:14 2023 +0200
[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(