Class AbstractWebFluxEndpointHandlerMapping

java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.reactive.handler.AbstractHandlerMapping
org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping<org.springframework.web.reactive.result.method.RequestMappingInfo>
org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping
org.springframework.boot.actuate.endpoint.web.reactive.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:
AdditionalHealthEndpointPathsWebFluxHandlerMapping, WebFluxEndpointHandlerMapping

@ImportRuntimeHints(org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping.AbstractWebFluxEndpointHandlerMappingRuntimeHints.class) 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 Details

    • AbstractWebFluxEndpointHandlerMapping

      public AbstractWebFluxEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, org.springframework.web.cors.CorsConfiguration corsConfiguration, boolean shouldRegisterLinksMapping)
      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
      shouldRegisterLinksMapping - whether the links endpoint should be registered
  • Method Details

    • 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>
    • registerReadMapping

      protected void registerReadMapping(org.springframework.web.reactive.result.method.RequestMappingInfo requestMappingInfo, ExposableWebEndpoint endpoint, WebOperation operation)
    • wrapReactiveWebOperation

      Hook point that allows subclasses to wrap the AbstractWebFluxEndpointHandlerMapping.ReactiveWebOperation before it's called. Allows additional features, such as security, to be added.
      Parameters:
      endpoint - the source endpoint
      operation - the source operation
      reactiveWebOperation - the reactive web operation to wrap
      Returns:
      a wrapped reactive web operation
    • hasCorsConfigurationSource

      protected boolean hasCorsConfigurationSource(Object handler)
      Overrides:
      hasCorsConfigurationSource 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>
    • getLinksHandler

      protected abstract AbstractWebFluxEndpointHandlerMapping.LinksHandler getLinksHandler()
      Return the Handler providing actuator links at the root endpoint.
      Returns:
      the links handler
    • getEndpoints

      public Collection<ExposableWebEndpoint> getEndpoints()
      Return the web endpoints being mapped.
      Returns:
      the endpoints