diff --git a/exam-online-api/hig-application/pom.xml b/exam-online-api/hig-application/pom.xml index 1d6cb48..4e77134 100644 --- a/exam-online-api/hig-application/pom.xml +++ b/exam-online-api/hig-application/pom.xml @@ -3,7 +3,7 @@ com.ruoyi ruoyi - 3.6.0 + 3.8.6 hig-application @@ -11,35 +11,29 @@ 应用扩展包 1.8 - 1.2.47 + 1.2.83 1.18.30 12.2.0.1.0 - 1.1.13 - 2.1.1 - 2.8.6 - 3.0.2 + 1.2.20 + 2.3.2 + 2.10.1 + 3.0.5 2.3.2 - 4.5.10 - 4.5.10 - 4.4.12 - 1.9 + 4.5.14 + 4.5.14 + 4.4.16 + 1.15 1.2 - 2.8.0 - 3.4 - 3.4 - 4.1.0 + 2.11.0 + 3.12.0 + 3.12.0 + 4.5.0 org.springframework.boot spring-boot-starter-web - - - log4j-to-slf4j - org.apache.logging.log4j - - @@ -137,7 +131,7 @@ com.thoughtworks.xstream xstream - 1.4.14 + 1.4.20 @@ -177,7 +171,7 @@ org.json json - 20210307 + 20231013 com.ruoyi diff --git a/exam-online-api/hig-application/src/main/java/com/hig/ueditor/controller/UEditorController.java b/exam-online-api/hig-application/src/main/java/com/hig/ueditor/controller/UEditorController.java index a1bf606..b524846 100644 --- a/exam-online-api/hig-application/src/main/java/com/hig/ueditor/controller/UEditorController.java +++ b/exam-online-api/hig-application/src/main/java/com/hig/ueditor/controller/UEditorController.java @@ -31,7 +31,7 @@ import com.hig.ueditor.define.State; @RestController @RequestMapping("/ueditor") -@CrossOrigin(allowCredentials = "true") +@CrossOrigin(allowCredentials = "true", originPatterns = "*") public class UEditorController { @Autowired private UEditorUpload uEditorUpload; diff --git a/exam-online-api/hig-common/pom.xml b/exam-online-api/hig-common/pom.xml index d497560..2acaf2f 100644 --- a/exam-online-api/hig-common/pom.xml +++ b/exam-online-api/hig-common/pom.xml @@ -3,36 +3,30 @@ com.ruoyi ruoyi - 3.6.0 + 3.8.6 hig-common hig-common 应用框架公用部分 1.8 - 1.2.47 - 1.18.4 - 2.8.6 - 3.0.2 - 4.5.10 - 4.5.10 - 4.4.12 - 1.9 + 1.2.83 + 1.18.30 + 2.10.1 + 3.0.5 + 4.5.14 + 4.5.14 + 4.4.16 + 1.15 1.2 - 2.8.0 - 3.4 + 2.11.0 + 3.12.0 org.springframework.boot spring-boot-starter-web - - - log4j-to-slf4j - org.apache.logging.log4j - - @@ -101,7 +95,7 @@ com.thoughtworks.xstream xstream - 1.4.14 + 1.4.20 @@ -127,5 +121,9 @@ commons-lang3 ${commons-lang3.version} - + + com.google.code.gson + gson + + \ No newline at end of file diff --git a/exam-online-api/pom.xml b/exam-online-api/pom.xml index c9dbcb8..f1c4472 100644 --- a/exam-online-api/pom.xml +++ b/exam-online-api/pom.xml @@ -6,34 +6,35 @@ com.ruoyi ruoyi - 3.6.0 + 3.8.6 ruoyi http://www.ruoyi.vip 新框架扩展应用 - 3.6.0 + 3.8.6 UTF-8 UTF-8 1.8 3.1.1 - 1.2.6 + 1.2.16 1.21 3.0.0 2.3.2 - 2.1.4 + 2.3.2 - 1.3.1 - 1.2.76 - 5.7.5 - 5.8.0 - 2.10.0 - 1.4 + 1.4.7 + 1.2.83 + 6.4.6 + 5.13.0 + 2.11.0 + 1.5 3.2.2 - 4.1.2 - 1.7 + 5.2.4 + 2.3 0.9.1 + 8.0.33 @@ -44,7 +45,7 @@ org.springframework.boot spring-boot-dependencies - 2.2.13.RELEASE + 2.5.15 pom import @@ -140,14 +141,8 @@ org.apache.velocity - velocity + velocity-engine-core ${velocity.version} - - - commons-collections - commons-collections - - @@ -164,6 +159,13 @@ ${fastjson.version} + + + mysql + mysql-connector-java + ${mysql.version} + + io.jsonwebtoken @@ -256,7 +258,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.8.1 ${java.version} ${java.version} @@ -270,7 +272,7 @@ public aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ + https://maven.aliyun.com/repository/public true @@ -281,7 +283,7 @@ public aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ + https://maven.aliyun.com/repository/public true diff --git a/exam-online-api/ruoyi-admin/pom.xml b/exam-online-api/ruoyi-admin/pom.xml index 73c4912..340d0e1 100644 --- a/exam-online-api/ruoyi-admin/pom.xml +++ b/exam-online-api/ruoyi-admin/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.6.0 + 3.8.6 4.0.0 jar @@ -80,7 +80,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.1.1.RELEASE + 2.5.15 true @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-war-plugin - 3.1.0 + 3.4.0 false examapi diff --git a/exam-online-api/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/exam-online-api/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index c121377..1ecd062 100644 --- a/exam-online-api/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/exam-online-api/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -4,7 +4,8 @@ import java.io.UnsupportedEncodingException; import java.util.Base64; import java.util.List; import java.util.Set; -import org.springframework.beans.factory.annotation.Autowired; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -29,6 +30,7 @@ import com.ruoyi.system.service.ISysMenuService; @RestController public class SysLoginController { + private static final Logger log = LoggerFactory.getLogger(SysLoginController.class); @Autowired private SysLoginService loginService; @@ -87,7 +89,7 @@ public class SysLoginController ajax.put("user", user); ajax.put("roles", roles); ajax.put("permissions", permissions); - System.out.println("ajax:" + ajax.toString()); + log.debug("ajax:{}", ajax.toString()); return ajax; } diff --git a/exam-online-api/ruoyi-admin/src/main/resources/application.yml b/exam-online-api/ruoyi-admin/src/main/resources/application.yml index e31a4ec..398ffa7 100644 --- a/exam-online-api/ruoyi-admin/src/main/resources/application.yml +++ b/exam-online-api/ruoyi-admin/src/main/resources/application.yml @@ -57,7 +57,7 @@ spring: # host: localhost # Redis服务器地址 host: 127.0.0.1 port: 6379 # Redis服务器连接端口 - password: # Redis服务器连接密码(默认为空) + password: 123456 # Redis服务器连接密码(默认为空) timeout: 20000 # 连接超时时间(毫秒) jedis: pool: diff --git a/exam-online-api/ruoyi-common/pom.xml b/exam-online-api/ruoyi-common/pom.xml index 774e03b..35a3d77 100644 --- a/exam-online-api/ruoyi-common/pom.xml +++ b/exam-online-api/ruoyi-common/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.6.0 + 3.8.6 4.0.0 @@ -99,7 +99,6 @@ org.springframework.boot spring-boot-starter-data-redis - 1.5.22.RELEASE diff --git a/exam-online-api/ruoyi-framework/pom.xml b/exam-online-api/ruoyi-framework/pom.xml index 2cab469..0094c82 100644 --- a/exam-online-api/ruoyi-framework/pom.xml +++ b/exam-online-api/ruoyi-framework/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.6.0 + 3.8.6 4.0.0 @@ -21,12 +21,6 @@ org.springframework.boot spring-boot-starter-web - - - log4j-to-slf4j - org.apache.logging.log4j - - diff --git a/exam-online-api/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/exam-online-api/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index 18f932e..13b844c 100644 --- a/exam-online-api/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/exam-online-api/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -52,17 +52,20 @@ public class ResourcesConfig implements WebMvcConfigurer @Bean public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); // 设置访问源地址 - config.addAllowedOrigin("*"); + config.addAllowedOriginPattern("*"); // 设置访问源请求头 config.addAllowedHeader("*"); // 设置访问源请求方法 config.addAllowedMethod("*"); - // 对接口配置跨域设置 + // 有效期 1800秒 + config.setMaxAge(1800L); + // 添加映射路径,拦截一切请求 + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", config); + // 返回新的CorsFilter return new CorsFilter(source); } } \ No newline at end of file diff --git a/exam-online-api/ruoyi-generator/pom.xml b/exam-online-api/ruoyi-generator/pom.xml index 940acdc..1180284 100644 --- a/exam-online-api/ruoyi-generator/pom.xml +++ b/exam-online-api/ruoyi-generator/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.6.0 + 3.8.6 4.0.0 @@ -20,7 +20,7 @@ org.apache.velocity - velocity + velocity-engine-core diff --git a/exam-online-api/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java b/exam-online-api/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java index 32452b8..62ce821 100644 --- a/exam-online-api/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java +++ b/exam-online-api/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java @@ -2,6 +2,7 @@ package com.ruoyi.generator.util; import java.util.Properties; import org.apache.velocity.app.Velocity; +import org.apache.velocity.runtime.RuntimeConstants; import com.ruoyi.common.constant.Constants; /** @@ -19,11 +20,10 @@ public class VelocityInitializer Properties p = new Properties(); try { - // 加载classpath目录下的vm文件 - p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); // 定义字符集 - p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8); - p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8); + p.setProperty(RuntimeConstants.INPUT_ENCODING, Constants.UTF8); + p.setProperty(RuntimeConstants.RESOURCE_LOADERS, "class"); + p.setProperty("resource.loader.class.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); // 初始化Velocity引擎,指定配置Properties Velocity.init(p); } diff --git a/exam-online-api/ruoyi-quartz/pom.xml b/exam-online-api/ruoyi-quartz/pom.xml index 9ad0ef4..43dcb2f 100644 --- a/exam-online-api/ruoyi-quartz/pom.xml +++ b/exam-online-api/ruoyi-quartz/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.6.0 + 3.8.6 4.0.0 diff --git a/exam-online-api/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java b/exam-online-api/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java index 58c69bc..44d51ac 100644 --- a/exam-online-api/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java +++ b/exam-online-api/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java @@ -1,57 +1,57 @@ -package com.ruoyi.quartz.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; -import javax.sql.DataSource; -import java.util.Properties; - -/** - * 定时任务配置 - * - * @author ruoyi - */ -@Configuration -public class ScheduleConfig -{ - @Bean - public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) - { - SchedulerFactoryBean factory = new SchedulerFactoryBean(); - factory.setDataSource(dataSource); - - // quartz参数 - Properties prop = new Properties(); - prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); - prop.put("org.quartz.scheduler.instanceId", "AUTO"); - // 线程池配置 - prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); - prop.put("org.quartz.threadPool.threadCount", "20"); - prop.put("org.quartz.threadPool.threadPriority", "5"); - // JobStore配置 - prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX"); - // 集群配置 - prop.put("org.quartz.jobStore.isClustered", "true"); - prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); - prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); - prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); - - // sqlserver 启用 - // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); - prop.put("org.quartz.jobStore.misfireThreshold", "12000"); - prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); - factory.setQuartzProperties(prop); - - factory.setSchedulerName("RuoyiScheduler"); - // 延时启动 - factory.setStartupDelay(1); - factory.setApplicationContextSchedulerContextKey("applicationContextKey"); - // 可选,QuartzScheduler - // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 - factory.setOverwriteExistingJobs(true); - // 设置自动启动,默认为true - factory.setAutoStartup(true); - - return factory; - } -} +//package com.ruoyi.quartz.config; +// +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.scheduling.quartz.SchedulerFactoryBean; +//import javax.sql.DataSource; +//import java.util.Properties; +// +///** +// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效) +// * +// * @author ruoyi +// */ +//@Configuration +//public class ScheduleConfig +//{ +// @Bean +// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) +// { +// SchedulerFactoryBean factory = new SchedulerFactoryBean(); +// factory.setDataSource(dataSource); +// +// // quartz参数 +// Properties prop = new Properties(); +// prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); +// prop.put("org.quartz.scheduler.instanceId", "AUTO"); +// // 线程池配置 +// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); +// prop.put("org.quartz.threadPool.threadCount", "20"); +// prop.put("org.quartz.threadPool.threadPriority", "5"); +// // JobStore配置 +// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); +// // 集群配置 +// prop.put("org.quartz.jobStore.isClustered", "true"); +// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); +// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); +// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); +// +// // sqlserver 启用 +// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); +// prop.put("org.quartz.jobStore.misfireThreshold", "12000"); +// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); +// +// factory.setQuartzProperties(prop); +// factory.setSchedulerName("RuoyiScheduler"); +// // 延时启动 +// factory.setStartupDelay(1); +// factory.setApplicationContextSchedulerContextKey("applicationContextKey"); +// // 可选,QuartzScheduler +// // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 +// factory.setOverwriteExistingJobs(true); +// // 设置自动启动,默认为true +// factory.setAutoStartup(true); +// +// return factory; +// } +//} diff --git a/exam-online-api/ruoyi-system/pom.xml b/exam-online-api/ruoyi-system/pom.xml index 6d4665f..ff108e7 100644 --- a/exam-online-api/ruoyi-system/pom.xml +++ b/exam-online-api/ruoyi-system/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.6.0 + 3.8.6 4.0.0 diff --git a/exam_online_ui/src/views/questions/examquestions/examQuestions.vue b/exam_online_ui/src/views/questions/examquestions/examQuestions.vue index 070e009..9acffa5 100644 --- a/exam_online_ui/src/views/questions/examquestions/examQuestions.vue +++ b/exam_online_ui/src/views/questions/examquestions/examQuestions.vue @@ -1,63 +1,46 @@