类 RouterFunctionMapping

    • 构造器详细资料

      • RouterFunctionMapping

        public RouterFunctionMapping()
        Create an empty RouterFunctionMapping.

        If this constructor is used, this mapping will detect all RouterFunction instances available in the application context.

      • RouterFunctionMapping

        public RouterFunctionMapping​(RouterFunction<?> routerFunction)
        Create a RouterFunctionMapping with the given RouterFunction.

        If this constructor is used, no application context detection will occur.

        参数:
        routerFunction - the router function to use for mapping
    • 方法详细资料

      • setRouterFunction

        public void setRouterFunction​(@Nullable
                                      RouterFunction<?> routerFunction)
        Set the router function to map to.

        If this property is used, no application context detection will occur.

      • setDetectHandlerFunctionsInAncestorContexts

        public void setDetectHandlerFunctionsInAncestorContexts​(boolean detectHandlerFunctionsInAncestorContexts)
        Set whether to detect handler functions in ancestor ApplicationContexts.

        Default is "false": Only handler functions 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.

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        从接口复制的说明: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        指定者:
        afterPropertiesSet 在接口中 InitializingBean
        抛出:
        Exception - in the event of misconfiguration (such as failure to set an essential property) or if initialization fails for any other reason