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
3714cee5
Commit
3714cee5
authored
Mar 26, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify impact of @ComponentScan on @RibbonClient
Fixes gh-281
parent
d0021f04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
spring-cloud-netflix.adoc
docs/src/main/asciidoc/spring-cloud-netflix.adoc
+11
-1
No files found.
docs/src/main/asciidoc/spring-cloud-netflix.adoc
View file @
3714cee5
...
@@ -137,7 +137,9 @@ random value will not be needed.
...
@@ -137,7 +137,9 @@ random value will not be needed.
Once you have an app that is `@EnableEurekaClient` you can use it to
Once you have an app that is `@EnableEurekaClient` you can use it to
discover service instances from the <<spring-cloud-eureka-server,
discover service instances from the <<spring-cloud-eureka-server,
Eureka Server>>. One way to do that is to use the native `DiscoveryClient`, e.g.
Eureka Server>>. One way to do that is to use the native
`com.netflix.discovery.DiscoveryClient` (as opposed to the Spring
Cloud `DiscoveryClient`), e.g.
----
----
@Autowired
@Autowired
...
@@ -560,6 +562,14 @@ In this case the client is composed from the components already in
...
@@ -560,6 +562,14 @@ In this case the client is composed from the components already in
`RibbonClientConfiguration` together with any in `FooConfiguration`
`RibbonClientConfiguration` together with any in `FooConfiguration`
(where the latter generally will override the former).
(where the latter generally will override the former).
WARNING: The `FooConfiguration` has to be `@Configuration` but take
care that it is not in a `@ComponentScan` for the main application
context, otherwise it will be shared by all the `@RibbonClients`. If
you use `@ComponentScan` (or `@SpringBootApplication`) you need to
take steps to avoid it being included (for instance put it in a
separate, non-overlapping package, or specify the packages to scan
explicitly in the `@ComponentScan`).
Spring Cloud Netflix provides the following beans by default for ribbon
Spring Cloud Netflix provides the following beans by default for ribbon
(`BeanType` beanName: `ClassName`):
(`BeanType` beanName: `ClassName`):
...
...
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