mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish
This commit is contained in:
parent
41fc023a67
commit
2bb54f16fb
@ -34,8 +34,6 @@ import org.springframework.boot.test.rule.OutputCapture;
|
||||
import org.springframework.boot.test.util.TestPropertyValues;
|
||||
import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -46,7 +44,6 @@ import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.ProviderManager;
|
||||
import org.springframework.security.authentication.TestingAuthenticationProvider;
|
||||
import org.springframework.security.authentication.TestingAuthenticationToken;
|
||||
import org.springframework.security.authentication.event.AbstractAuthenticationEvent;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
@ -271,18 +268,6 @@ public class SecurityAutoConfigurationTests {
|
||||
DispatcherType.ERROR);
|
||||
}
|
||||
|
||||
private static final class AuthenticationListener
|
||||
implements ApplicationListener<AbstractAuthenticationEvent> {
|
||||
|
||||
private ApplicationEvent event;
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(AbstractAuthenticationEvent event) {
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@TestAutoConfigurationPackage(City.class)
|
||||
protected static class EntityConfiguration {
|
||||
|
@ -88,7 +88,7 @@ public class OAuth2WebSecurityConfigurationTests {
|
||||
.run((context) -> assertThat(getAuthCodeFilters(context)).isEmpty());
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "cast" })
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<Filter> getAuthCodeFilters(AssertableApplicationContext context) {
|
||||
FilterChainProxy filterChain = (FilterChainProxy) context
|
||||
.getBean("springSecurityFilterChain");
|
||||
|
Loading…
Reference in New Issue
Block a user