diff --git a/pom.xml b/pom.xml index 6ccbdbeb..d24b87a9 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ UTF-8 1.8 3.2.0 - 1.2.6 + 1.2.8 3.0.3 1.5.22 4.1.2 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index ddf4c70b..b1ecf81f 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -25,7 +25,6 @@ public class ResourcesConfig implements WebMvcConfigurer { */ @Bean public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); // 设置访问源地址 @@ -34,8 +33,12 @@ public class ResourcesConfig implements WebMvcConfigurer { 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/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index a32c6805..bd7c528a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -150,6 +150,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl -
Redis版本
-
{{ cache.info.redis_version }}
-
运行模式
-
{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}
-
端口
-
{{ cache.info.tcp_port }}
-
客户端数
-
{{ cache.info.connected_clients }}
+
Redis版本
+
{{ cache.info.redis_version }}
+
运行模式
+
{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}
+
端口
+
{{ cache.info.tcp_port }}
+
客户端数
+
{{ cache.info.connected_clients }}
-
运行时间(天)
-
{{ cache.info.uptime_in_days }}
-
使用内存
-
{{ cache.info.used_memory_human }}
-
使用CPU
-
{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}
-
内存配置
-
{{ cache.info.maxmemory_human }}
+
运行时间(天)
+
{{ cache.info.uptime_in_days }}
+
使用内存
+
{{ cache.info.used_memory_human }}
+
使用CPU
+
{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}
+
内存配置
+
{{ cache.info.maxmemory_human }}
-
AOF是否开启
-
{{ cache.info.aof_enabled == "0" ? "否" : "是" }}
-
RDB是否成功
-
{{ cache.info.rdb_last_bgsave_status }}
-
Key数量
-
{{ cache.dbSize }}
-
网络入口/出口
-
{{ cache.info.instantaneous_input_kbps }}kps/{{cache.info.instantaneous_output_kbps}}kps
+
AOF是否开启
+
{{ cache.info.aof_enabled == "0" ? "否" : "是" }}
+
RDB是否成功
+
{{ cache.info.rdb_last_bgsave_status }}
+
Key数量
+
{{ cache.dbSize }}
+
网络入口/出口
+
{{ cache.info.instantaneous_input_kbps }}kps/{{cache.info.instantaneous_output_kbps}}kps