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
b71ecc1c
Unverified
Commit
b71ecc1c
authored
Oct 18, 2017
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated DiscoveryClient.getLocalServiceInstance()
parent
71bd19d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
37 deletions
+2
-37
EurekaDiscoveryClient.java
...framework/cloud/netflix/eureka/EurekaDiscoveryClient.java
+2
-37
No files found.
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClient.java
View file @
b71ecc1c
...
...
@@ -16,8 +16,6 @@
package
org
.
springframework
.
cloud
.
netflix
.
eureka
;
import
static
com
.
netflix
.
appinfo
.
InstanceInfo
.
PortType
.
SECURE
;
import
java.net.URI
;
import
java.util.ArrayList
;
import
java.util.Collections
;
...
...
@@ -35,6 +33,8 @@ import com.netflix.discovery.EurekaClient;
import
com.netflix.discovery.shared.Application
;
import
com.netflix.discovery.shared.Applications
;
import
static
com
.
netflix
.
appinfo
.
InstanceInfo
.
PortType
.
SECURE
;
/**
* @author Spencer Gibb
*/
...
...
@@ -57,41 +57,6 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
}
@Override
public
ServiceInstance
getLocalServiceInstance
()
{
return
new
ServiceInstance
()
{
@Override
public
String
getServiceId
()
{
return
EurekaDiscoveryClient
.
this
.
config
.
getAppname
();
}
@Override
public
String
getHost
()
{
return
EurekaDiscoveryClient
.
this
.
config
.
getHostName
(
false
);
}
@Override
public
int
getPort
()
{
return
EurekaDiscoveryClient
.
this
.
config
.
getNonSecurePort
();
}
@Override
public
boolean
isSecure
()
{
return
EurekaDiscoveryClient
.
this
.
config
.
getSecurePortEnabled
();
}
@Override
public
URI
getUri
()
{
return
DefaultServiceInstance
.
getUri
(
this
);
}
@Override
public
Map
<
String
,
String
>
getMetadata
()
{
return
EurekaDiscoveryClient
.
this
.
config
.
getMetadataMap
();
}
};
}
@Override
public
List
<
ServiceInstance
>
getInstances
(
String
serviceId
)
{
List
<
InstanceInfo
>
infos
=
this
.
eurekaClient
.
getInstancesByVipAddress
(
serviceId
,
false
);
...
...
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