Class DispatcherServletRegistrationBean

  • All Implemented Interfaces:
    DispatcherServletPath, org.springframework.boot.web.servlet.ServletContextInitializer, org.springframework.core.Ordered

    public class DispatcherServletRegistrationBean
    extends org.springframework.boot.web.servlet.ServletRegistrationBean<org.springframework.web.servlet.DispatcherServlet>
    implements DispatcherServletPath
    ServletRegistrationBean for the auto-configured DispatcherServlet. Both registers the servlet and exposes DispatcherServletPath information.
    Since:
    2.0.4
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidaddUrlMappings​(String... urlMappings) 
      StringgetPath()
      Returns the configured path of the dispatcher servlet.
      voidsetUrlMappings​(Collection<String> urlMappings) 
      • Methods inherited from class org.springframework.boot.web.servlet.ServletRegistrationBean

        addRegistration, configure, getDescription, getMultipartConfig, getServlet, getServletName, getUrlMappings, setLoadOnStartup, setMultipartConfig, setServlet, toString
      • Methods inherited from class org.springframework.boot.web.servlet.DynamicRegistrationBean

        addInitParameter, getInitParameters, getOrDeduceName, isAsyncSupported, register, setAsyncSupported, setInitParameters, setName
      • Methods inherited from class org.springframework.boot.web.servlet.RegistrationBean

        getOrder, isEnabled, onStartup, setEnabled, setOrder
    • Method Detail

      • setUrlMappings

        public void setUrlMappings​(Collection<String> urlMappings)
        Overrides:
        setUrlMappings in class org.springframework.boot.web.servlet.ServletRegistrationBean<org.springframework.web.servlet.DispatcherServlet>
      • addUrlMappings

        public void addUrlMappings​(String... urlMappings)
        Overrides:
        addUrlMappings in class org.springframework.boot.web.servlet.ServletRegistrationBean<org.springframework.web.servlet.DispatcherServlet>