@Configuration(proxyBeanMethods=false) @AutoConfigureOrder(value=-2147483648) @ConditionalOnClass(value=javax.servlet.ServletRequest.class) @ConditionalOnWebApplication(type=SERVLET) @EnableConfigurationProperties(value=ServerProperties.class) @Import(value={ServletWebServerFactoryAutoConfiguration.BeanPostProcessorsRegistrar.class,org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration.EmbeddedTomcat.class,org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration.EmbeddedJetty.class,org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration.EmbeddedUndertow.class}) public class ServletWebServerFactoryAutoConfiguration extends Object
Auto-configuration
for servlet web servers.Modifier and Type | Class and Description |
---|---|
static class |
ServletWebServerFactoryAutoConfiguration.BeanPostProcessorsRegistrar
Registers a
WebServerFactoryCustomizerBeanPostProcessor . |
Constructor and Description |
---|
ServletWebServerFactoryAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
FilterRegistrationBean<ForwardedHeaderFilter> |
forwardedHeaderFilter() |
ServletWebServerFactoryCustomizer |
servletWebServerFactoryCustomizer(ServerProperties serverProperties,
ObjectProvider<WebListenerRegistrar> webListenerRegistrars,
ObjectProvider<CookieSameSiteSupplier> cookieSameSiteSuppliers) |
TomcatServletWebServerFactoryCustomizer |
tomcatServletWebServerFactoryCustomizer(ServerProperties serverProperties) |
public ServletWebServerFactoryAutoConfiguration()
@Bean public ServletWebServerFactoryCustomizer servletWebServerFactoryCustomizer(ServerProperties serverProperties, ObjectProvider<WebListenerRegistrar> webListenerRegistrars, ObjectProvider<CookieSameSiteSupplier> cookieSameSiteSuppliers)
@Bean @ConditionalOnClass(name="org.apache.catalina.startup.Tomcat") public TomcatServletWebServerFactoryCustomizer tomcatServletWebServerFactoryCustomizer(ServerProperties serverProperties)
@Bean @ConditionalOnMissingFilterBean(value=org.springframework.web.filter.ForwardedHeaderFilter.class) @ConditionalOnProperty(value="server.forward-headers-strategy", havingValue="framework") public FilterRegistrationBean<ForwardedHeaderFilter> forwardedHeaderFilter()