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
e4870c94
Commit
e4870c94
authored
Jan 11, 2018
by
Guillaume Berche
Committed by
Ryan Baxter
Jan 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine Feign manual client doc (#2627)
parent
241468ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
spring-cloud-netflix.adoc
docs/src/main/asciidoc/spring-cloud-netflix.adoc
+7
-1
No files found.
docs/src/main/asciidoc/spring-cloud-netflix.adoc
View file @
e4870c94
...
...
@@ -1192,15 +1192,17 @@ class FooController {
@Autowired
public FooController(
Decoder decoder, Encoder encoder, Client client) {
Decoder decoder, Encoder encoder, Client client
, Contract contract
) {
this.fooClient = Feign.builder().client(client)
.encoder(encoder)
.decoder(decoder)
.contract(contract)
.requestInterceptor(new BasicAuthRequestInterceptor("user", "user"))
.target(FooClient.class, "http://PROD-SVC");
this.adminClient = Feign.builder().client(client)
.encoder(encoder)
.decoder(decoder)
.contract(contract)
.requestInterceptor(new BasicAuthRequestInterceptor("admin", "admin"))
.target(FooClient.class, "http://PROD-SVC");
}
...
...
@@ -1212,6 +1214,10 @@ provided by Spring Cloud Netflix.
NOTE: `PROD-SVC` is the name of the service the Clients will be making requests to.
NOTE: The Feign `Contract` object defines what annotations and values are valid on interfaces. The
autowired `Contract` bean provides supports for SpringMVC annotations, instead of
the default Feign native annotations.
[[spring-cloud-feign-hystrix]]
=== Feign Hystrix Support
...
...
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