Skip to content

Commit

Permalink
Change the property name prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Jan 16, 2025
1 parent 5b8d97b commit ae858d3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
Expand All @@ -19,6 +20,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Documented
@Inherited
@Import(EnableFeignAutoRefresh.Marker.class)
public @interface EnableFeignAutoRefresh {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class AutoRefreshCapability implements Capability, ApplicationContextAwar

private String contextId;

private static final String CONTEXT_ID_PROPERTY_NAME = "feign.client.name";
private static final String CONTEXT_ID_PROPERTY_NAME = "spring.cloud.openfeign.client.name";

public AutoRefreshCapability(FeignClientProperties clientProperties, FeignClientFactory feignClientFactory, FeignComponentRegistry componentRegistry) {
this.clientProperties = clientProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ public FeignClientConfigurationChangedListener(FeignComponentRegistry registry)
this.registry = registry;
}

private final String PREFIX = "feign.client.config.";
private final String PREFIX = "spring.cloud.openfeign.client.config.";

@Override
public void onApplicationEvent(EnvironmentChangeEvent event) {
Map<String, Set<String>> effectiveClients = resolveChangedClient(event);
effectiveClients.forEach(registry::refresh);

}

protected Map<String, Set<String>> resolveChangedClient(EnvironmentChangeEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class EncoderChangedTest extends BaseTest<Encoder> {

@Override
protected String afterTestComponentConfigKey() {
return "feign.client.config.my-client.encoder";
return "spring.cloud.openfeign.client.config.my-client.encoder";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ErrorDecoderChangedTest extends BaseTest<ErrorDecoder> {

@Override
protected String afterTestComponentConfigKey() {
return "feign.client.config.my-client.error-decoder";
return "spring.cloud.openfeign.client.config.my-client.error-decoder";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class QueryMapEncoderChangedTest extends BaseTest<QueryMapEncoder> {

@Override
protected String afterTestComponentConfigKey() {
return "feign.client.config.my-client.query-map-encoder";
return "spring.cloud.openfeign.client.config.my-client.query-map-encoder";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class RequestInterceptorChangedTest extends BaseTest<RequestInterceptor>

@Override
protected String afterTestComponentConfigKey() {
return "feign.client.config.my-client.request-interceptors[0]";
return "spring.cloud.openfeign.client.config.my-client.request-interceptors[0]";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class RetryerChangedTest extends BaseTest<Retryer> {

@Override
protected String afterTestComponentConfigKey() {
return "feign.client.config.my-client.retryer";
return "spring.cloud.openfeign.client.config.my-client.retryer";
}

@Override
Expand Down

0 comments on commit ae858d3

Please sign in to comment.