org.springframework.web.servlet.handler

Class AbstractDetectingUrlHandlerMapping

    • Constructor Detail

      • AbstractDetectingUrlHandlerMapping

        public AbstractDetectingUrlHandlerMapping()
    • Method Detail

      • setDetectHandlersInAncestorContexts

        public void setDetectHandlersInAncestorContexts(boolean detectHandlersInAncestorContexts)
        Set whether to detect handler beans in ancestor ApplicationContexts.

        Default is "false": Only handler beans in the current ApplicationContext will be detected, i.e. only in the context that this HandlerMapping itself is defined in (typically the current DispatcherServlet's context).

        Switch this flag on to detect handler beans in ancestor contexts (typically the Spring root WebApplicationContext) as well.

      • determineUrlsForHandler

        protected abstract java.lang.String[] determineUrlsForHandler(java.lang.String beanName)
        Determine the URLs for the given handler bean.
        Parameters:
        beanName - the name of the candidate bean
        Returns:
        the URLs determined for the bean, or an empty array if none