From 08885f65cd6815fbc18a5b485eb9fd99c2a0d2cf Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 24 Nov 2021 16:40:18 +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-modules/ruoyi-gen/pom.xml | 2 +- .../src/main/java/com/ruoyi/gen/util/VelocityInitializer.java | 3 +-- .../src/main/java/com/ruoyi/job/config/ScheduleConfig.java | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 3336a50..0baaf10 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 3.4.1 2.11.0 1.4 - 1.7 + 2.3 1.2.78 0.9.1 8.2.2 @@ -151,14 +151,8 @@ org.apache.velocity - velocity + velocity-engine-core ${velocity.version} - - - commons-collections - commons-collections - - diff --git a/ruoyi-modules/ruoyi-gen/pom.xml b/ruoyi-modules/ruoyi-gen/pom.xml index 21d5b7e..f61269d 100644 --- a/ruoyi-modules/ruoyi-gen/pom.xml +++ b/ruoyi-modules/ruoyi-gen/pom.xml @@ -51,7 +51,7 @@ org.apache.velocity - velocity + velocity-engine-core diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java index b856f66..c073662 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java +++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/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); } diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java index a7ad163..4b6eee7 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java @@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.quartz.SchedulerFactoryBean; /** - * 定时任务配置 + * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效) * * @author ruoyi */