类 AbstractControllerUrlHandlerMapping

    • 方法详细资料

      • setIncludeAnnotatedControllers

        public void setIncludeAnnotatedControllers​(boolean includeAnnotatedControllers)
        已过时。
        Set whether to activate or deactivate detection of annotated controllers.
      • setExcludedPackages

        public void setExcludedPackages​(String... excludedPackages)
        已过时。
        Specify Java packages that should be excluded from this mapping. Any classes in such a package (or any of its subpackages) will be ignored by this HandlerMapping.

        Default is to exclude the entire "org.springframework.web.servlet.mvc" package, including its subpackages, since none of Spring's out-of-the-box Controller implementations is a reasonable candidate for this mapping strategy. Such controllers are typically handled by a separate HandlerMapping, e.g. a BeanNameUrlHandlerMapping, alongside this ControllerClassNameHandlerMapping for application controllers.

      • setExcludedClasses

        public void setExcludedClasses​(Class<?>... excludedClasses)
        已过时。
        Specify controller classes that should be excluded from this mapping. Any such classes will simply be ignored by this HandlerMapping.
      • isControllerType

        protected boolean isControllerType​(Class<?> beanClass)
        已过时。
        Determine whether the given bean class indicates a controller type that is supported by this mapping strategy.
        参数:
        beanClass - the class to introspect
      • isMultiActionControllerType

        protected boolean isMultiActionControllerType​(Class<?> beanClass)
        已过时。
        Determine whether the given bean class indicates a controller type that dispatches to multiple action methods.
        参数:
        beanClass - the class to introspect
      • buildUrlsForHandler

        protected abstract String[] buildUrlsForHandler​(String beanName,
                                                        Class<?> beanClass)
        已过时。
        Abstract template method to be implemented by subclasses.
        参数:
        beanName - the name of the bean
        beanClass - the type of the bean
        返回:
        the URLs determined for the bean