From 41a3bdf73dc7fdbbbe69a9b943ff6f8552a463e1 Mon Sep 17 00:00:00 2001 From: 秋辞未寒 <545073804@qq.com> Date: 星期四, 02 一月 2025 15:34:40 +0800 Subject: [PATCH] !629 update 优化jdk21环境开启虚拟线程时的定时任务池 * update 优化jdk21环境开启虚拟线程时的定时任务池 --- ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java index bc27d6f..32d61df 100644 --- a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java +++ b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java @@ -19,23 +19,21 @@ @EnableConfigurationProperties(XssProperties.class) public class FilterConfig { - @SuppressWarnings({"rawtypes", "unchecked"}) @Bean @ConditionalOnProperty(value = "xss.enabled", havingValue = "true") - public FilterRegistrationBean xssFilterRegistration(XssProperties xssProperties) { - FilterRegistrationBean registration = new FilterRegistrationBean(); + public FilterRegistrationBean<XssFilter> xssFilterRegistration() { + FilterRegistrationBean<XssFilter> registration = new FilterRegistrationBean<>(); registration.setDispatcherTypes(DispatcherType.REQUEST); registration.setFilter(new XssFilter()); registration.addUrlPatterns("/*"); registration.setName("xssFilter"); - registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE); + registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE + 1); return registration; } - @SuppressWarnings({"rawtypes", "unchecked"}) @Bean - public FilterRegistrationBean someFilterRegistration() { - FilterRegistrationBean registration = new FilterRegistrationBean(); + public FilterRegistrationBean<RepeatableFilter> someFilterRegistration() { + FilterRegistrationBean<RepeatableFilter> registration = new FilterRegistrationBean<>(); registration.setFilter(new RepeatableFilter()); registration.addUrlPatterns("/*"); registration.setName("repeatableFilter"); -- Gitblit v1.9.3