类 DispatcherServletRegistrationBean
java.lang.Object
org.springframework.boot.web.servlet.RegistrationBean
org.springframework.boot.web.servlet.DynamicRegistrationBean<ServletRegistration.Dynamic>
org.springframework.boot.web.servlet.ServletRegistrationBean<DispatcherServlet>
org.springframework.boot.autoconfigure.web.servlet.DispatcherServletRegistrationBean
- 所有已实现的接口:
Aware
,BeanNameAware
,DispatcherServletPath
,ServletContextInitializer
,Ordered
public class DispatcherServletRegistrationBean
extends ServletRegistrationBean<DispatcherServlet>
implements DispatcherServletPath
ServletRegistrationBean
for the auto-configured DispatcherServlet
. Both
registers the servlet and exposes DispatcherServletPath
information.- 从以下版本开始:
- 2.0.4
- 作者:
- Phillip Webb
-
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
构造器概要
构造器构造器说明DispatcherServletRegistrationBean
(DispatcherServlet servlet, String path) Create a newDispatcherServletRegistrationBean
instance for the given servlet and path. -
方法概要
修饰符和类型方法说明void
addUrlMappings
(String... urlMappings) Add URL mappings, as defined in the Servlet specification, for the servlet.getPath()
Returns the configured path of the dispatcher servlet.void
setUrlMappings
(Collection<String> urlMappings) Set the URL mappings for the servlet.从类继承的方法 org.springframework.boot.web.servlet.ServletRegistrationBean
addRegistration, configure, getDescription, getMultipartConfig, getServlet, getServletName, getUrlMappings, setLoadOnStartup, setMultipartConfig, setServlet, toString
从类继承的方法 org.springframework.boot.web.servlet.DynamicRegistrationBean
addInitParameter, getInitParameters, getOrDeduceName, isAsyncSupported, register, setAsyncSupported, setBeanName, setIgnoreRegistrationFailure, setInitParameters, setName
从类继承的方法 org.springframework.boot.web.servlet.RegistrationBean
getOrder, isEnabled, onStartup, setEnabled, setOrder
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath
getPrefix, getRelativePath, getServletUrlMapping
-
构造器详细资料
-
DispatcherServletRegistrationBean
Create a newDispatcherServletRegistrationBean
instance for the given servlet and path.- 参数:
servlet
- the dispatcher servletpath
- the dispatcher servlet path
-
-
方法详细资料
-
getPath
从接口复制的说明:DispatcherServletPath
Returns the configured path of the dispatcher servlet.- 指定者:
getPath
在接口中DispatcherServletPath
- 返回:
- the configured path
-
setUrlMappings
从类复制的说明:ServletRegistrationBean
Set the URL mappings for the servlet. If not specified the mapping will default to '/'. This will replace any previously specified mappings.- 覆盖:
setUrlMappings
在类中ServletRegistrationBean<DispatcherServlet>
- 参数:
urlMappings
- the mappings to set- 另请参阅:
-
addUrlMappings
从类复制的说明:ServletRegistrationBean
Add URL mappings, as defined in the Servlet specification, for the servlet.- 覆盖:
addUrlMappings
在类中ServletRegistrationBean<DispatcherServlet>
- 参数:
urlMappings
- the mappings to add- 另请参阅:
-