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, toStringaddInitParameter, getInitParameters, getOrDeduceName, isAsyncSupported, register, setAsyncSupported, setInitParameters, setNamegetOrder, isEnabled, onStartup, setEnabled, setOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPrefix, getRelativePath, getServletUrlMappingpublic DispatcherServletRegistrationBean(DispatcherServlet servlet, String path)
DispatcherServletRegistrationBean instance for the given
servlet and path.servlet - the dispatcher servletpath - the dispatcher servlet pathpublic String getPath()
DispatcherServletPathgetPath in interface DispatcherServletPathpublic void setUrlMappings(Collection<String> urlMappings)
ServletRegistrationBeansetUrlMappings in class ServletRegistrationBean<DispatcherServlet>urlMappings - the mappings to setServletRegistrationBean.addUrlMappings(String...)public void addUrlMappings(String... urlMappings)
ServletRegistrationBeanaddUrlMappings in class ServletRegistrationBean<DispatcherServlet>urlMappings - the mappings to addServletRegistrationBean.setUrlMappings(Collection)