Class AbstractHttpServiceRegistrar

java.lang.Object
org.springframework.web.service.registry.AbstractHttpServiceRegistrar
All Implemented Interfaces:
Aware, BeanFactoryAware, ImportBeanDefinitionRegistrar, EnvironmentAware, ResourceLoaderAware

public abstract class AbstractHttpServiceRegistrar extends Object implements ImportBeanDefinitionRegistrar, EnvironmentAware, ResourceLoaderAware, BeanFactoryAware
Abstract registrar class that imports:
  • Bean definitions for HTTP Service interface client proxies organized by HttpServiceGroup.
  • Bean definition for an HttpServiceProxyRegistryFactoryBean that initializes the infrastructure for each group, RestClient or WebClient and a proxy factory, necessary to create the proxies.

Subclasses determine the HTTP Service types (interfaces with @HttpExchange methods) to register by implementing registerHttpServices(org.springframework.web.service.registry.AbstractHttpServiceRegistrar.GroupRegistry, org.springframework.core.type.AnnotationMetadata).

There is built-in support for declaring HTTP Services through ImportHttpServices annotations. It is also possible to perform registrations directly, sourced in another way, by extending this class.

It is possible to import multiple instances of this registrar type. Subsequent imports update the existing registry FactoryBean definition, and likewise merge HTTP Service group definitions.

An application can autowire HTTP Service proxy beans, or autowire the HttpServiceProxyRegistry from which to obtain proxies.

Since:
7.0
Author:
Rossen Stoyanchev, Phillip Webb, Olga Maciaszek-Sharma
See Also: