Skip to content

io microsphere spring cloud client service registry autoconfigure WebServiceRegistryAutoConfiguration

github-actions[bot] edited this page Jun 10, 2026 · 5 revisions

WebServiceRegistryAutoConfiguration

Type: Class | Module: microsphere-spring-cloud-commons | Package: io.microsphere.spring.cloud.client.service.registry.autoconfigure | Since: 1.0.0

Source: microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/service/registry/autoconfigure/WebServiceRegistryAutoConfiguration.java

Overview

Auto-Configuration class for ServiceRegistry ServiceRegistry on the Spring WebMVC Application

Declaration

public abstract class WebServiceRegistryAutoConfiguration implements ApplicationListener<WebEndpointMappingsReadyEvent>

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.2.18-SNAPSHOT

Version Compatibility

This component is tested and compatible with the following Java versions:

Java Version Status
Java 17 ✅ Compatible
Java 21 ✅ Compatible
Java 25 ✅ Compatible

Examples

Method Examples

onApplicationEvent

// This listener is invoked automatically by the Spring event system:
// When WebEndpointMappingsReadyEvent is published, metadata is attached
// to each Registration bean in the ApplicationContext.

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-spring-cloud-commons</artifactId>
    <version>${microsphere-spring-cloud.version}</version>
</dependency>

Tip: Use the BOM (microsphere-spring-cloud-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.spring.cloud.client.service.registry.autoconfigure.WebServiceRegistryAutoConfiguration;

API Reference

Public Methods

Method Description
onApplicationEvent Handles WebEndpointMappingsReadyEvent by attaching web endpoint mapping metadata

Method Details

onApplicationEvent

public final void onApplicationEvent(WebEndpointMappingsReadyEvent event)

Handles WebEndpointMappingsReadyEvent by attaching web endpoint mapping metadata to all available Registration instances.

Example Usage:

`// This listener is invoked automatically by the Spring event system:
// When WebEndpointMappingsReadyEvent is published, metadata is attached
// to each Registration bean in the ApplicationContext.
`

This documentation was auto-generated from the source code of microsphere-spring-cloud.

Home

spring-cloud-commons

spring-cloud-openfeign

Clone this wiki locally