From 16734b1d88bdab94516ec1f43833017d8cf8d821 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 24 Nov 2021 15:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7velocity=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC2.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 10 ++-------- ruoyi-generator/pom.xml | 2 +- .../com/ruoyi/generator/util/VelocityInitializer.java | 3 +-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 2f3dd72..7c0f863 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 f68bbe9..89d921f 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 4be1eec..2645633 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); }