Interface ConfigurableTomcatWebServerFactory
- All Superinterfaces:
org.springframework.boot.web.server.ConfigurableWebServerFactory, org.springframework.boot.web.error.ErrorPageRegistry, org.springframework.boot.web.server.WebServerFactory
- All Known Implementing Classes:
TomcatReactiveWebServerFactory, TomcatServletWebServerFactory, TomcatWebServerFactory
public interface ConfigurableTomcatWebServerFactory
extends org.springframework.boot.web.server.ConfigurableWebServerFactory
ConfigurableWebServerFactory for Tomcat-specific features.- Since:
- 4.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectorCustomizers(TomcatConnectorCustomizer... tomcatConnectorCustomizers) AddTomcatConnectorCustomizers that should be added to the TomcatConnector.voidaddContextCustomizers(TomcatContextCustomizer... tomcatContextCustomizers) AddTomcatContextCustomizers that should be added to the TomcatContext.voidaddEngineValves(org.apache.catalina.Valve... engineValves) AddValves that should be applied to the TomcatEngine.voidaddProtocolHandlerCustomizers(TomcatProtocolHandlerCustomizer<?>... tomcatProtocolHandlerCustomizers) AddTomcatProtocolHandlerCustomizers that should be added to the TomcatConnector.voidaddServerCustomizers(TomcatServerCustomizer... tomcatServerCustomizers) AddTomcatServerCustomizers that should be applied to the TomcatServer.voidsetBackgroundProcessorDelay(int delay) Sets the background processor delay in seconds.voidsetBaseDirectory(@Nullable File baseDirectory) Set the Tomcat base directory.voidsetDisableMBeanRegistry(boolean disableMBeanRegistry) Set whether the factory should disable Tomcat's MBean registry prior to creating the server.voidsetRemoteIp(@Nullable RemoteIp remoteIp) Sets the remote IP configuration.voidsetUriEncoding(Charset uriEncoding) Set the character encoding to use for URL decoding.voidsetUseApr(boolean useApr) Whether to use APR.Methods inherited from interface org.springframework.boot.web.server.ConfigurableWebServerFactory
setAddress, setCompression, setErrorPages, setForwardedRequestHeaders, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslBundlesMethods inherited from interface org.springframework.boot.web.error.ErrorPageRegistry
addErrorPages
-
Method Details
-
setBaseDirectory
Set the Tomcat base directory. If not specified a temporary directory will be used.- Parameters:
baseDirectory- the tomcat base directory
-
setBackgroundProcessorDelay
void setBackgroundProcessorDelay(int delay) Sets the background processor delay in seconds.- Parameters:
delay- the delay in seconds
-
setRemoteIp
Sets the remote IP configuration.- Parameters:
remoteIp- the remote IP configuration ornullfor defaults.- Since:
- 4.2.0
-
addEngineValves
void addEngineValves(org.apache.catalina.Valve... engineValves) AddValves that should be applied to the TomcatEngine.- Parameters:
engineValves- the valves to add
-
addConnectorCustomizers
AddTomcatConnectorCustomizers that should be added to the TomcatConnector.- Parameters:
tomcatConnectorCustomizers- the customizers to add
-
addContextCustomizers
AddTomcatContextCustomizers that should be added to the TomcatContext.- Parameters:
tomcatContextCustomizers- the customizers to add
-
addProtocolHandlerCustomizers
void addProtocolHandlerCustomizers(TomcatProtocolHandlerCustomizer<?>... tomcatProtocolHandlerCustomizers) AddTomcatProtocolHandlerCustomizers that should be added to the TomcatConnector.- Parameters:
tomcatProtocolHandlerCustomizers- the customizers to add
-
addServerCustomizers
AddTomcatServerCustomizers that should be applied to the TomcatServer.- Parameters:
tomcatServerCustomizers- the customizers to apply- Since:
- 4.2.0
-
setUriEncoding
Set the character encoding to use for URL decoding. If not specified 'UTF-8' will be used.- Parameters:
uriEncoding- the uri encoding to set
-
setUseApr
void setUseApr(boolean useApr) Whether to use APR.- Parameters:
useApr- whether to use APR
-
setDisableMBeanRegistry
void setDisableMBeanRegistry(boolean disableMBeanRegistry) Set whether the factory should disable Tomcat's MBean registry prior to creating the server.- Parameters:
disableMBeanRegistry- whether to disable the MBean registry
-