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
856c4713
Unverified
Commit
856c4713
authored
Jun 20, 2016
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use deprecated constructor.
Eliminates a legacy use of a static singleton. This will help allow multiple registrations.
parent
83cdf647
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
EurekaRibbonClientConfiguration.java
...etflix/ribbon/eureka/EurekaRibbonClientConfiguration.java
+4
-2
RibbonClientPreprocessorIntegrationTests.java
...bbon/eureka/RibbonClientPreprocessorIntegrationTests.java
+6
-0
No files found.
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/ribbon/eureka/EurekaRibbonClientConfiguration.java
View file @
856c4713
...
...
@@ -17,7 +17,9 @@
package
org
.
springframework
.
cloud
.
netflix
.
ribbon
.
eureka
;
import
javax.annotation.PostConstruct
;
import
javax.inject.Provider
;
import
com.netflix.discovery.EurekaClient
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
...
...
@@ -89,9 +91,9 @@ public class EurekaRibbonClientConfiguration {
@Bean
@ConditionalOnMissingBean
public
ServerList
<?>
ribbonServerList
(
IClientConfig
config
)
{
public
ServerList
<?>
ribbonServerList
(
IClientConfig
config
,
Provider
<
EurekaClient
>
eurekaClientProvider
)
{
DiscoveryEnabledNIWSServerList
discoveryServerList
=
new
DiscoveryEnabledNIWSServerList
(
config
);
config
,
eurekaClientProvider
);
DomainExtractingServerList
serverList
=
new
DomainExtractingServerList
(
discoveryServerList
,
config
,
this
.
approximateZoneFromHostname
);
return
serverList
;
...
...
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/ribbon/eureka/RibbonClientPreprocessorIntegrationTests.java
View file @
856c4713
...
...
@@ -16,8 +16,10 @@
package
org
.
springframework
.
cloud
.
netflix
.
ribbon
.
eureka
;
import
com.netflix.discovery.EurekaClient
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Mockito
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
...
...
@@ -92,6 +94,10 @@ public class RibbonClientPreprocessorIntegrationTests {
ArchaiusAutoConfiguration
.
class
,
RibbonAutoConfiguration
.
class
,
RibbonEurekaAutoConfiguration
.
class
})
protected
static
class
TestConfiguration
{
@Bean
EurekaClient
eurekaClient
()
{
return
Mockito
.
mock
(
EurekaClient
.
class
);
}
}
@Configuration
...
...
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