Describe the bug

In version spring boot 2.6.8, eventPublisher was set up in ProviderManager as follows

@Configuration public class RestSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { } } Spring Security ProviderManager  eventPublisher  is null Spring Security ProviderManager  eventPublisher  is null

In version spring boot 2.7.3, eventPublisher was set up null in ProviderManager as follows

Spring Security ProviderManager  eventPublisher  is null

To Reproduce

@Bean public SecurityFilterChain restSecurityFilterChain(HttpSecurity http) throws Exception { return http.build(); }

Expected behavior eventPublisher is not null, The same behavior as Spring Boot 2.6.8 is guaranteed

Comment From: marcusdacoregio

Hi @tofdragon, thanks for the report.

This was fixed via https://github.com/spring-projects/spring-security/issues/11449 and should be available in Spring Security 5.6.8.