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
a91815aa
Commit
a91815aa
authored
Dec 08, 2016
by
Ryan Baxter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Retryer a bean.
parent
14dd2d23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
FeignClientsConfiguration.java
...mework/cloud/netflix/feign/FeignClientsConfiguration.java
+8
-2
FeignClientOverrideDefaultsTests.java
...cloud/netflix/feign/FeignClientOverrideDefaultsTests.java
+1
-1
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientsConfiguration.java
View file @
a91815aa
...
...
@@ -103,10 +103,16 @@ public class FeignClientsConfiguration {
}
@Bean
@ConditionalOnMissingBean
public
Retryer
feignRetryer
()
{
return
Retryer
.
NEVER_RETRY
;
}
@Bean
@Scope
(
"prototype"
)
@ConditionalOnMissingBean
public
Feign
.
Builder
feignBuilder
()
{
return
Feign
.
builder
().
retryer
(
Retryer
.
NEVER_RETRY
);
public
Feign
.
Builder
feignBuilder
(
Retryer
retryer
)
{
return
Feign
.
builder
().
retryer
(
retryer
);
}
@Bean
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/FeignClientOverrideDefaultsTests.java
View file @
a91815aa
...
...
@@ -108,7 +108,7 @@ public class FeignClientOverrideDefaultsTests {
@Test
public
void
overrideRetryer
()
{
assert
Null
(
this
.
context
.
getInstance
(
"foo"
,
Retryer
.
class
));
assert
Equals
(
Retryer
.
NEVER_RETRY
,
this
.
context
.
getInstance
(
"foo"
,
Retryer
.
class
));
Retryer
.
Default
.
class
.
cast
(
this
.
context
.
getInstance
(
"bar"
,
Retryer
.
class
));
}
...
...
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