From 3dfb116fdd4120567493d03c075da327a5e4f71c Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期一, 18 四月 2022 19:55:23 +0800 Subject: [PATCH] update 优化文件上传、图片上传组件 文件列表展示文件原名便于后续处理, 完善组件删除功能 --- ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) 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 461bc2c..67769a8 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 @@ -1,6 +1,8 @@ package com.ruoyi.generator.util; import com.ruoyi.common.constant.Constants; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.apache.velocity.app.Velocity; import java.util.Properties; @@ -10,6 +12,7 @@ * * @author ruoyi */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) public class VelocityInitializer { /** @@ -19,10 +22,9 @@ Properties p = new Properties(); 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); // 鍒濆鍖朧elocity寮曟搸锛屾寚瀹氶厤缃甈roperties Velocity.init(p); } catch (Exception e) { -- Gitblit v1.9.3