Browse Source

升级velocity到最新版本2.3

tags/v3.3.0
RuoYi 3 years ago
parent
commit
08885f65cd
  1. 10
      pom.xml
  2. 2
      ruoyi-modules/ruoyi-gen/pom.xml
  3. 3
      ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
  4. 2
      ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java

10
pom.xml

@ -32,7 +32,7 @@
<dynamic-ds.version>3.4.1</dynamic-ds.version> <dynamic-ds.version>3.4.1</dynamic-ds.version>
<commons.io.version>2.11.0</commons.io.version> <commons.io.version>2.11.0</commons.io.version>
<commons.fileupload.version>1.4</commons.fileupload.version> <commons.fileupload.version>1.4</commons.fileupload.version>
<velocity.version>1.7</velocity.version> <velocity.version>2.3</velocity.version>
<fastjson.version>1.2.78</fastjson.version> <fastjson.version>1.2.78</fastjson.version>
<jjwt.version>0.9.1</jjwt.version> <jjwt.version>0.9.1</jjwt.version>
<minio.version>8.2.2</minio.version> <minio.version>8.2.2</minio.version>
@ -151,14 +151,8 @@
<!-- 代码生成使用模板 --> <!-- 代码生成使用模板 -->
<dependency> <dependency>
<groupId>org.apache.velocity</groupId> <groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId> <artifactId>velocity-engine-core</artifactId>
<version>${velocity.version}</version> <version>${velocity.version}</version>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!-- Collection 增强Java集合框架 --> <!-- Collection 增强Java集合框架 -->

2
ruoyi-modules/ruoyi-gen/pom.xml

@ -51,7 +51,7 @@
<!-- Apache Velocity --> <!-- Apache Velocity -->
<dependency> <dependency>
<groupId>org.apache.velocity</groupId> <groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId> <artifactId>velocity-engine-core</artifactId>
</dependency> </dependency>
<!-- Commons Collections --> <!-- Commons Collections -->

3
ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java

@ -20,10 +20,9 @@ public class VelocityInitializer
try try
{ {
// 加载classpath目录下的vm文件 // 加载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.INPUT_ENCODING, Constants.UTF8);
p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8);
// 初始化Velocity引擎,指定配置Properties // 初始化Velocity引擎,指定配置Properties
Velocity.init(p); Velocity.init(p);
} }

2
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; import org.springframework.scheduling.quartz.SchedulerFactoryBean;
/** /**
* 定时任务配置 * 定时任务配置单机部署建议删除此类和qrtz数据库表默认走内存会最高效
* *
* @author ruoyi * @author ruoyi
*/ */

Loading…
Cancel
Save