Skip to content

Commit 1c00226

Browse files
authored
polishing FeignClientsRegistrar (#1038)
* polishing feignClientsRegistrar * update the date in the license and add author
1 parent a6f8202 commit 1c00226

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignClientsRegistrar.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2022 the original author or authors.
2+
* Copyright 2013-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,6 +67,7 @@
6767
* @author Marcin Grzejszczak
6868
* @author Olga Maciaszek-Sharma
6969
* @author Jasbir Singh
70+
* @author Jinho Lee
7071
*/
7172
class FeignClientsRegistrar implements ImportBeanDefinitionRegistrar, ResourceLoaderAware, EnvironmentAware {
7273

@@ -321,19 +322,15 @@ private void validate(Map<String, Object> attributes) {
321322
validateFallbackFactory(annotation.getClass("fallbackFactory"));
322323
}
323324

324-
/* for testing */ String getName(Map<String, Object> attributes) {
325-
return getName(null, attributes);
326-
}
327-
328-
String getName(ConfigurableBeanFactory beanFactory, Map<String, Object> attributes) {
325+
String getName(Map<String, Object> attributes) {
329326
String name = (String) attributes.get("serviceId");
330327
if (!StringUtils.hasText(name)) {
331328
name = (String) attributes.get("name");
332329
}
333330
if (!StringUtils.hasText(name)) {
334331
name = (String) attributes.get("value");
335332
}
336-
name = resolve(beanFactory, name);
333+
name = resolve(null, name);
337334
return getName(name);
338335
}
339336

0 commit comments

Comments
 (0)