From 9f2dc5c233ad145768dca37907a829cfcb1a5483 Mon Sep 17 00:00:00 2001 From: scmiot <scmiot@qq.com> Date: 星期六, 29 十月 2022 16:23:09 +0800 Subject: [PATCH] 删除几个Controller和代码生成模板中冗余的三元表达式。 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java index 57c9276..6f3b099 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java @@ -20,7 +20,6 @@ * @author Lion Li */ @Configuration -@ConditionalOnProperty(value = "xss.enabled", havingValue = "true") public class FilterConfig { @Autowired @@ -28,11 +27,12 @@ @SuppressWarnings({"rawtypes", "unchecked"}) @Bean + @ConditionalOnProperty(value = "xss.enabled", havingValue = "true") public FilterRegistrationBean xssFilterRegistration() { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setDispatcherTypes(DispatcherType.REQUEST); registration.setFilter(new XssFilter()); - registration.addUrlPatterns(StringUtils.splitToArray(xssProperties.getUrlPatterns(), ",")); + registration.addUrlPatterns(StringUtils.split(xssProperties.getUrlPatterns(), ",")); registration.setName("xssFilter"); registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE); Map<String, String> initParameters = new HashMap<String, String>(); -- Gitblit v1.9.3