public interface ConfigurableEmbeddedServletContainer extends ErrorPageRegistry
EmbeddedServletContainerFactory
.EmbeddedServletContainerFactory
,
EmbeddedServletContainerCustomizer
Modifier and Type | Method and Description |
---|---|
void |
addInitializers(ServletContextInitializer... initializers)
Add
ServletContextInitializer s to those that should be applied in addition
to
EmbeddedServletContainerFactory.getEmbeddedServletContainer(ServletContextInitializer...)
parameters. |
void |
setAddress(InetAddress address)
Sets the specific network address that the server should bind to.
|
void |
setCompression(Compression compression)
Sets the compression configuration that will be applied to the container's default
connector.
|
void |
setContextPath(String contextPath)
Sets the context path for the embedded servlet container.
|
void |
setDisplayName(String displayName)
Sets the display name of the application deployed in the embedded servlet
container.
|
void |
setDocumentRoot(File documentRoot)
Sets the document root directory which will be used by the web context to serve
static files.
|
void |
setErrorPages(Set<? extends ErrorPage> errorPages)
Sets the error pages that will be used when handling exceptions.
|
void |
setInitializers(List<? extends ServletContextInitializer> initializers)
Sets
ServletContextInitializer that should be applied in addition to
EmbeddedServletContainerFactory.getEmbeddedServletContainer(ServletContextInitializer...)
parameters. |
void |
setJspServlet(JspServlet jspServlet)
Sets the configuration that will be applied to the container's JSP servlet.
|
void |
setLocaleCharsetMappings(Map<Locale,Charset> localeCharsetMappings)
Sets the Locale to Charset mappings.
|
void |
setMimeMappings(MimeMappings mimeMappings)
Sets the mime-type mappings.
|
void |
setPersistSession(boolean persistSession)
Sets if session data should be persisted between restarts.
|
void |
setPort(int port)
Sets the port that the embedded servlet container should listen on.
|
void |
setRegisterDefaultServlet(boolean registerDefaultServlet)
Set if the DefaultServlet should be registered.
|
void |
setServerHeader(String serverHeader)
Sets the server header value.
|
void |
setSessionStoreDir(File sessionStoreDir)
Set the directory used to store serialized session data.
|
void |
setSessionTimeout(int sessionTimeout)
The session timeout in seconds (default 30 minutes).
|
void |
setSessionTimeout(int sessionTimeout,
TimeUnit timeUnit)
The session timeout in the specified
TimeUnit (default 30 minutes). |
void |
setSsl(Ssl ssl)
Sets the SSL configuration that will be applied to the container's default
connector.
|
void |
setSslStoreProvider(SslStoreProvider sslStoreProvider)
Sets a provider that will be used to obtain SSL stores.
|
addErrorPages
void setContextPath(String contextPath)
contextPath
- the contextPath to setvoid setDisplayName(String displayName)
displayName
- the displayName to setvoid setPort(int port)
port
- the port to setvoid setSessionTimeout(int sessionTimeout)
sessionTimeout
- the session timeoutvoid setSessionTimeout(int sessionTimeout, TimeUnit timeUnit)
TimeUnit
(default 30 minutes). If 0 or
negative then sessions never expire.sessionTimeout
- the session timeouttimeUnit
- the time unitvoid setPersistSession(boolean persistSession)
persistSession
- true
if session data should be persistedvoid setSessionStoreDir(File sessionStoreDir)
sessionStoreDir
- the directory or null
to use a default location.void setAddress(InetAddress address)
address
- the address to set (defaults to null
)void setRegisterDefaultServlet(boolean registerDefaultServlet)
true
so that
files from the document root
will be served.registerDefaultServlet
- if the default servlet should be registeredvoid setErrorPages(Set<? extends ErrorPage> errorPages)
errorPages
- the error pagesvoid setMimeMappings(MimeMappings mimeMappings)
mimeMappings
- the mime type mappings (defaults to
MimeMappings.DEFAULT
)void setDocumentRoot(File documentRoot)
documentRoot
- the document root or null
if not requiredvoid setInitializers(List<? extends ServletContextInitializer> initializers)
ServletContextInitializer
that should be applied in addition to
EmbeddedServletContainerFactory.getEmbeddedServletContainer(ServletContextInitializer...)
parameters. This method will replace any previously set or added initializers.initializers
- the initializers to setaddInitializers(org.springframework.boot.web.servlet.ServletContextInitializer...)
void addInitializers(ServletContextInitializer... initializers)
ServletContextInitializer
s to those that should be applied in addition
to
EmbeddedServletContainerFactory.getEmbeddedServletContainer(ServletContextInitializer...)
parameters.initializers
- the initializers to addsetInitializers(java.util.List<? extends org.springframework.boot.web.servlet.ServletContextInitializer>)
void setSsl(Ssl ssl)
ssl
- the SSL configurationvoid setSslStoreProvider(SslStoreProvider sslStoreProvider)
sslStoreProvider
- the SSL store providervoid setJspServlet(JspServlet jspServlet)
jspServlet
- the JSP servlet configurationvoid setCompression(Compression compression)
compression
- the compression configurationvoid setServerHeader(String serverHeader)
serverHeader
- the server header valueCopyright © 2019 Pivotal Software, Inc.. All rights reserved.