Bladeren bron

SEC-2773: Prevent premature container initialization in WebSecurityConfiguration.

Changed the bean definition method for the DelegatingApplicationListener
to be static to avoid the need to instantiate the configuration class which
caused further premature initializations to satisfy the dependencies
expressed in setFilterChainProxySecurityConfigurer(…).
Oliver Gierke 10 jaren geleden
bovenliggende
commit
0f7c2e4128

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java

@@ -74,7 +74,7 @@ public class WebSecurityConfiguration implements ImportAware, BeanClassLoaderAwa
     private ClassLoader beanClassLoader;
     private ClassLoader beanClassLoader;
 
 
     @Bean
     @Bean
-    public DelegatingApplicationListener delegatingApplicationListener() {
+    public static DelegatingApplicationListener delegatingApplicationListener() {
         return new DelegatingApplicationListener();
         return new DelegatingApplicationListener();
     }
     }