Skip to content

io microsphere spring cloud openfeign autorefresh FeignClientConfigurationChangedListener

github-actions[bot] edited this page Apr 8, 2026 · 2 revisions

FeignClientConfigurationChangedListener

Type: Class | Module: microsphere-spring-cloud-openfeign | Package: io.microsphere.spring.cloud.openfeign.autorefresh | Since: 0.0.1

Source: microsphere-spring-cloud-openfeign/src/main/java/io/microsphere/spring/cloud/openfeign/autorefresh/FeignClientConfigurationChangedListener.java

Overview

FeignClientConfigurationChangedListener is a class in the io.microsphere.spring.cloud.openfeign.autorefresh package of the microsphere-spring-cloud-openfeign module.

Declaration

public class FeignClientConfigurationChangedListener implements ApplicationListener<EnvironmentChangeEvent>

Author: 韩超

Version Information

  • Introduced in: 0.0.1
  • Current Project Version: 0.2.9-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

FeignComponentRegistry registry = ...;
FeignClientConfigurationChangedListener listener =
    new FeignClientConfigurationChangedListener(registry);
// Invoked automatically by the Spring event system
listener.onApplicationEvent(environmentChangeEvent);

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-spring-cloud-openfeign</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.openfeign.autorefresh.FeignClientConfigurationChangedListener;

API Reference

Public Methods

Method Description
onApplicationEvent Constructs a listener that refreshes Feign components when the environment changes.

Method Details

onApplicationEvent

public void onApplicationEvent(EnvironmentChangeEvent event)

Constructs a listener that refreshes Feign components when the environment changes.

Example Usage:

`FeignComponentRegistry registry = ...;
FeignClientConfigurationChangedListener listener =
    new FeignClientConfigurationChangedListener(registry);
`

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

Home

spring-cloud-commons

spring-cloud-openfeign

Clone this wiki locally