Class AbstractWebFluxEndpointHandlerMapping

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.reactive.HandlerMapping
    Direct Known Subclasses:
    WebFluxEndpointHandlerMapping

    public abstract class AbstractWebFluxEndpointHandlerMapping
    extends org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping
    A custom HandlerMapping that makes web endpoints available over HTTP using Spring WebFlux.
    Since:
    2.0.0
    • Constructor Detail

      • AbstractWebFluxEndpointHandlerMapping

        public AbstractWebFluxEndpointHandlerMapping​(EndpointMapping endpointMapping,
                                                     Collection<ExposableWebEndpoint> endpoints,
                                                     EndpointMediaTypes endpointMediaTypes,
                                                     org.springframework.web.cors.CorsConfiguration corsConfiguration)
        Creates a new AbstractWebFluxEndpointHandlerMapping that provides mappings for the operations of the given webEndpoints.
        Parameters:
        endpointMapping - the base mapping for all endpoints
        endpoints - the web endpoints
        endpointMediaTypes - media types consumed and produced by the endpoints
        corsConfiguration - the CORS configuration for the endpoints
    • Method Detail

      • initHandlerMethods

        protected void initHandlerMethods()
        Overrides:
        initHandlerMethods in class org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>
      • createHandlerMethod

        protected org.springframework.web.method.HandlerMethod createHandlerMethod​(Object handler,
                                                                                   Method method)
        Overrides:
        createHandlerMethod in class org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>
      • initCorsConfiguration

        protected org.springframework.web.cors.CorsConfiguration initCorsConfiguration​(Object handler,
                                                                                       Method method,
                                                                                       org.springframework.web.reactive.result.method.RequestMappingInfo mapping)
        Overrides:
        initCorsConfiguration in class org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>
      • isHandler

        protected boolean isHandler​(Class<?> beanType)
        Specified by:
        isHandler in class org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>
      • getMappingForMethod

        protected org.springframework.web.reactive.result.method.RequestMappingInfo getMappingForMethod​(Method method,
                                                                                                        Class<?> handlerType)
        Specified by:
        getMappingForMethod in class org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>