diff --git a/pom.xml b/pom.xml index 2f3dd728..7c0f8631 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 1.4 3.2.2 4.1.2 - 1.7 + 2.3 0.9.1 @@ -132,14 +132,8 @@ org.apache.velocity - velocity + velocity-engine-core ${velocity.version} - - - commons-collections - commons-collections - - diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index f68bbe98..89d921fb 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -20,7 +20,7 @@ org.apache.velocity - velocity + velocity-engine-core diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java index 4be1eecb..26456335 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java @@ -20,10 +20,9 @@ public class VelocityInitializer try { // 加载classpath目录下的vm文件 - p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); + p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); // 定义字符集 p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8); - p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8); // 初始化Velocity引擎,指定配置Properties Velocity.init(p); }