Interface ConfigurableServletWebServerFactory
- All Superinterfaces:
- ConfigurableWebServerFactory,- ErrorPageRegistry,- ServletWebServerFactory,- WebListenerRegistry,- WebServerFactory
- All Known Implementing Classes:
- AbstractServletWebServerFactory,- JettyServletWebServerFactory,- TomcatServletWebServerFactory,- UndertowServletWebServerFactory
public interface ConfigurableServletWebServerFactory
extends ConfigurableWebServerFactory, ServletWebServerFactory, WebListenerRegistry
A configurable 
ServletWebServerFactory.- Since:
- 2.0.0
- Author:
- Dave Syer, Andy Wilkinson, Stephane Nicoll, EddĂș MelĂ©ndez, Brian Clozel
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCookieSameSiteSuppliers(CookieSameSiteSupplier... cookieSameSiteSuppliers) AddCookieSameSiteSuppliersto those that should be used to obtain theCookie.SameSiteattribute of any added cookie.voidaddInitializers(ServletContextInitializer... initializers) AddServletContextInitializers to those that should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters.voidsetContextPath(String contextPath) Sets the context path for the web server.voidsetCookieSameSiteSuppliers(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) SetsCookieSameSiteSuppliersthat should be used to obtain theCookie.SameSiteattribute of any added cookie.voidsetDisplayName(String displayName) Sets the display name of the application deployed in the web server.voidsetDocumentRoot(File documentRoot) Sets the document root directory which will be used by the web context to serve static files.voidsetInitializers(List<? extends ServletContextInitializer> initializers) SetsServletContextInitializerthat should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters.voidsetInitParameters(Map<String, String> initParameters) Sets the init parameters that are applied to the container'sServletContext.voidSets the configuration that will be applied to the server's JSP servlet.voidsetLocaleCharsetMappings(Map<Locale, Charset> localeCharsetMappings) Sets the Locale to Charset mappings.voidsetMimeMappings(MimeMappings mimeMappings) Sets the mime-type mappings.voidsetRegisterDefaultServlet(boolean registerDefaultServlet) Set if the DefaultServlet should be registered.voidsetSession(Session session) Sets the configuration that will be applied to the container's HTTP session support.Methods inherited from interface org.springframework.boot.web.server.ConfigurableWebServerFactorysetAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslBundles, setSslStoreProviderMethods inherited from interface org.springframework.boot.web.server.ErrorPageRegistryaddErrorPagesMethods inherited from interface org.springframework.boot.web.servlet.server.ServletWebServerFactorygetWebServerMethods inherited from interface org.springframework.boot.web.servlet.WebListenerRegistryaddWebListeners
- 
Method Details- 
setContextPathSets the context path for the web server. The context should start with a "/" character but not end with a "/" character. The default context path can be specified using an empty string.- Parameters:
- contextPath- the contextPath to set
 
- 
setDisplayNameSets the display name of the application deployed in the web server.- Parameters:
- displayName- the displayName to set
- Since:
- 1.3.0
 
- 
setSessionSets the configuration that will be applied to the container's HTTP session support.- Parameters:
- session- the session configuration
 
- 
setRegisterDefaultServletvoid setRegisterDefaultServlet(boolean registerDefaultServlet) Set if the DefaultServlet should be registered. Defaults tofalsesince 2.4.- Parameters:
- registerDefaultServlet- if the default servlet should be registered
 
- 
setMimeMappingsSets the mime-type mappings.- Parameters:
- mimeMappings- the mime type mappings (defaults to- MimeMappings.DEFAULT)
 
- 
setDocumentRootSets the document root directory which will be used by the web context to serve static files.- Parameters:
- documentRoot- the document root or- nullif not required
 
- 
setInitializersSetsServletContextInitializerthat should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters. This method will replace any previously set or added initializers.- Parameters:
- initializers- the initializers to set
- See Also:
 
- 
addInitializersAddServletContextInitializers to those that should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters.- Parameters:
- initializers- the initializers to add
- See Also:
 
- 
setJspSets the configuration that will be applied to the server's JSP servlet.- Parameters:
- jsp- the JSP servlet configuration
 
- 
setLocaleCharsetMappingsSets the Locale to Charset mappings.- Parameters:
- localeCharsetMappings- the Locale to Charset mappings
 
- 
setInitParametersSets the init parameters that are applied to the container'sServletContext.- Parameters:
- initParameters- the init parameters
 
- 
setCookieSameSiteSuppliersSetsCookieSameSiteSuppliersthat should be used to obtain theCookie.SameSiteattribute of any added cookie. This method will replace any previously set or added suppliers.- Parameters:
- cookieSameSiteSuppliers- the suppliers to add
- See Also:
 
- 
addCookieSameSiteSuppliersAddCookieSameSiteSuppliersto those that should be used to obtain theCookie.SameSiteattribute of any added cookie.- Parameters:
- cookieSameSiteSuppliers- the suppliers to add
- See Also:
 
 
-