Unify WebServerFactoryCustomizers
Replace `ReactiveWebServerCustomizer` and `WebServerFactoryCustomizer` with a unified `WebServerFactoryCustomizer`. Fixes gh-8558
This commit is contained in:
@@ -24,8 +24,8 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.context.embedded.TomcatLegacyCookieProcessorExample.LegacyCookieProcessorConfiguration;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatWebServer;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor;
|
||||
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
|
||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactoryCustomizerBeanPostProcessor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -42,8 +42,8 @@ public class TomcatLegacyCookieProcessorExampleTests {
|
||||
public void cookieProcessorIsCustomized() {
|
||||
ServletWebServerApplicationContext applicationContext = (ServletWebServerApplicationContext) new SpringApplication(
|
||||
TestConfiguration.class, LegacyCookieProcessorConfiguration.class).run();
|
||||
Context context = (Context) ((TomcatWebServer) applicationContext
|
||||
.getWebServer()).getTomcat().getHost().findChildren()[0];
|
||||
Context context = (Context) ((TomcatWebServer) applicationContext.getWebServer())
|
||||
.getTomcat().getHost().findChildren()[0];
|
||||
assertThat(context.getCookieProcessor())
|
||||
.isInstanceOf(LegacyCookieProcessor.class);
|
||||
}
|
||||
@@ -57,8 +57,8 @@ public class TomcatLegacyCookieProcessorExampleTests {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ServletWebServerFactoryCustomizerBeanPostProcessor postProcessor() {
|
||||
return new ServletWebServerFactoryCustomizerBeanPostProcessor();
|
||||
public WebServerFactoryCustomizerBeanPostProcessor postProcessor() {
|
||||
return new WebServerFactoryCustomizerBeanPostProcessor();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user