package com.mortals.xhx.base.framework.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

@Configuration
@RefreshScope
public class RefreshConfig {

  //  @Value("${your.config.property}")
    private String configValue;

    @EventListener({RefreshScopeRefreshedEvent.class})
    public void onRefresh() {
        // 在配置刷新后执行特定的方法
        // 可以在这里调用你想要执行的方法
    }

    // ...
}
