From 6cfc372f70a7ec45cdce5ac9f46f7abb85fc0760 Mon Sep 17 00:00:00 2001 From: DingHao Date: Fri, 27 Dec 2024 18:36:57 +0800 Subject: [PATCH] Polish remove unused code Signed-off-by: DingHao --- .../configuration/WebSecurityConfiguration.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java b/config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java index d172a85d59..4490852862 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java +++ b/config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import java.util.Map; import jakarta.servlet.Filter; -import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; @@ -65,20 +64,16 @@ import org.springframework.security.web.context.AbstractSecurityWebApplicationIn * @see WebSecurity */ @Configuration(proxyBeanMethods = false) -public class WebSecurityConfiguration implements ImportAware, BeanClassLoaderAware { +public class WebSecurityConfiguration implements ImportAware { private WebSecurity webSecurity; private Boolean debugEnabled; - private List> webSecurityConfigurers; - private List securityFilterChains = Collections.emptyList(); private List webSecurityCustomizers = Collections.emptyList(); - private ClassLoader beanClassLoader; - @Autowired(required = false) private HttpSecurity httpSecurity; @@ -164,7 +159,6 @@ public class WebSecurityConfiguration implements ImportAware, BeanClassLoaderAwa for (SecurityConfigurer webSecurityConfigurer : webSecurityConfigurers) { this.webSecurity.apply(webSecurityConfigurer); } - this.webSecurityConfigurers = webSecurityConfigurers; } @Autowired(required = false) @@ -193,11 +187,6 @@ public class WebSecurityConfiguration implements ImportAware, BeanClassLoaderAwa } } - @Override - public void setBeanClassLoader(ClassLoader classLoader) { - this.beanClassLoader = classLoader; - } - /** * A custom version of the Spring provided AnnotationAwareOrderComparator that uses * {@link AnnotationUtils#findAnnotation(Class, Class)} to look on super class