public class DispatcherServletRegistrationBean extends ServletRegistrationBean<DispatcherServlet> implements DispatcherServletPath
ServletRegistrationBean
for the auto-configured DispatcherServlet
. Both
registers the servlet and exposes DispatcherServletPath
information.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
DispatcherServletRegistrationBean(DispatcherServlet servlet,
String path)
Create a new
DispatcherServletRegistrationBean instance for the given
servlet and path. |
Modifier and Type | Method and Description |
---|---|
void |
addUrlMappings(String... urlMappings)
Add URL mappings, as defined in the Servlet specification, for the servlet.
|
String |
getPath()
Returns the configured path of the dispatcher servlet.
|
void |
setUrlMappings(Collection<String> urlMappings)
Set the URL mappings for the servlet.
|
addRegistration, configure, getDescription, getMultipartConfig, getServlet, getServletName, getUrlMappings, setLoadOnStartup, setMultipartConfig, setServlet
addInitParameter, getInitParameters, getOrDeduceName, isAsyncSupported, register, setAsyncSupported, setInitParameters, setName
getOrder, isEnabled, onStartup, setEnabled, setOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPrefix, getRelativePath, getServletUrlMapping
public DispatcherServletRegistrationBean(DispatcherServlet servlet, String path)
DispatcherServletRegistrationBean
instance for the given
servlet and path.servlet
- the dispatcher servletpath
- the dispatcher servlet pathpublic String getPath()
DispatcherServletPath
getPath
in interface DispatcherServletPath
public void setUrlMappings(Collection<String> urlMappings)
ServletRegistrationBean
setUrlMappings
in class ServletRegistrationBean<DispatcherServlet>
urlMappings
- the mappings to setServletRegistrationBean.addUrlMappings(String...)
public void addUrlMappings(String... urlMappings)
ServletRegistrationBean
addUrlMappings
in class ServletRegistrationBean<DispatcherServlet>
urlMappings
- the mappings to addServletRegistrationBean.setUrlMappings(Collection)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.