Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
0985c8f0
Commit
0985c8f0
authored
Oct 11, 2016
by
Bartłomiej Słota
Committed by
GitHub
Oct 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1 from spring-cloud/master
Remove @Autowired from FeignClientFactoryBean
parents
279edf06
f30e8b7b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
FeignClientFactoryBean.java
...framework/cloud/netflix/feign/FeignClientFactoryBean.java
+5
-3
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientFactoryBean.java
View file @
0985c8f0
...
...
@@ -51,9 +51,9 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode
(
callSuper
=
false
)
class
FeignClientFactoryBean
implements
FactoryBean
<
Object
>,
InitializingBean
,
ApplicationContextAware
{
@Autowired
private
Targeter
targeter
;
/***********************************
* WARNING! Nothing in this class should be @Autowired. It causes NPEs because of some lifecycle race condition.
***********************************/
private
Class
<?>
type
;
...
...
@@ -146,6 +146,7 @@ class FeignClientFactoryBean implements FactoryBean<Object>, InitializingBean,
Client
client
=
getOptional
(
context
,
Client
.
class
);
if
(
client
!=
null
)
{
builder
.
client
(
client
);
Targeter
targeter
=
get
(
context
,
Targeter
.
class
);
return
targeter
.
target
(
this
,
builder
,
context
,
target
);
}
...
...
@@ -183,6 +184,7 @@ class FeignClientFactoryBean implements FactoryBean<Object>, InitializingBean,
}
builder
.
client
(
client
);
}
Targeter
targeter
=
get
(
context
,
Targeter
.
class
);
return
targeter
.
target
(
this
,
builder
,
context
,
new
HardCodedTarget
<>(
this
.
type
,
this
.
name
,
url
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment