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
ec257714
Unverified
Commit
ec257714
authored
Sep 28, 2017
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade Eureka to v1.8.2
fixes gh-2216
parent
c544f4ae
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
pom.xml
spring-cloud-netflix-dependencies/pom.xml
+1
-1
EurekaClientConfigBean.java
...ramework/cloud/netflix/eureka/EurekaClientConfigBean.java
+11
-0
CloudJacksonJson.java
...amework/cloud/netflix/eureka/server/CloudJacksonJson.java
+8
-6
No files found.
spring-cloud-netflix-dependencies/pom.xml
View file @
ec257714
...
...
@@ -15,7 +15,7 @@
<description>
Spring Cloud Netflix Dependencies
</description>
<properties>
<archaius.version>
0.7.5
</archaius.version>
<eureka.version>
1.
7.0
</eureka.version>
<eureka.version>
1.
8.2
</eureka.version>
<feign.version>
9.5.0
</feign.version>
<hystrix.version>
1.5.12
</hystrix.version>
<ribbon.version>
2.2.2
</ribbon.version>
...
...
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java
View file @
ec257714
...
...
@@ -383,6 +383,12 @@ public class EurekaClientConfigBean implements EurekaClientConfig {
*/
private
String
clientDataAccept
=
EurekaAccept
.
full
.
name
();
/**
* Indicates whether the client should explicitly unregister itself from the remote server
* on client shutdown.
*/
private
boolean
unregisterOnShutdown
=
true
;
@Override
public
boolean
shouldGZipContent
()
{
return
this
.
gZipContent
;
...
...
@@ -414,6 +420,11 @@ public class EurekaClientConfigBean implements EurekaClientConfig {
}
@Override
public
boolean
shouldUnregisterOnShutdown
()
{
return
this
.
unregisterOnShutdown
;
}
@Override
public
String
fetchRegistryForRemoteRegions
()
{
return
this
.
fetchRemoteRegionsRegistry
;
}
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/CloudJacksonJson.java
View file @
ec257714
...
...
@@ -5,6 +5,7 @@ import java.io.InputStream;
import
java.io.OutputStream
;
import
java.lang.reflect.Field
;
import
java.util.HashMap
;
import
java.util.function.Supplier
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.util.StringUtils
;
...
...
@@ -84,8 +85,9 @@ public class CloudJacksonJson extends LegacyJacksonJson {
module
.
addSerializer
(
Applications
.
class
,
new
ApplicationsSerializer
(
this
.
getVersionDeltaKey
(),
this
.
getAppHashCodeKey
()));
module
.
addDeserializer
(
DataCenterInfo
.
class
,
new
DataCenterInfoDeserializer
());
// TODO: Watch if this causes problems
// module.addDeserializer(DataCenterInfo.class,
// new DataCenterInfoDeserializer());
module
.
addDeserializer
(
LeaseInfo
.
class
,
new
LeaseInfoDeserializer
());
module
.
addDeserializer
(
InstanceInfo
.
class
,
new
CloudInstanceInfoDeserializer
(
mapper
));
...
...
@@ -96,12 +98,12 @@ public class CloudJacksonJson extends LegacyJacksonJson {
mapper
.
registerModule
(
module
);
HashMap
<
Class
<?>,
ObjectReader
>
readers
=
new
HashMap
<>();
readers
.
put
(
InstanceInfo
.
class
,
mapper
.
reader
().
withType
(
InstanceInfo
.
class
)
HashMap
<
Class
<?>,
Supplier
<
ObjectReader
>
>
readers
=
new
HashMap
<>();
readers
.
put
(
InstanceInfo
.
class
,
()->
mapper
.
reader
().
withType
(
InstanceInfo
.
class
)
.
withRootName
(
"instance"
));
readers
.
put
(
Application
.
class
,
mapper
.
reader
().
withType
(
Application
.
class
)
readers
.
put
(
Application
.
class
,
()->
mapper
.
reader
().
withType
(
Application
.
class
)
.
withRootName
(
"application"
));
readers
.
put
(
Applications
.
class
,
mapper
.
reader
().
withType
(
Applications
.
class
)
readers
.
put
(
Applications
.
class
,
()->
mapper
.
reader
().
withType
(
Applications
.
class
)
.
withRootName
(
"applications"
));
setField
(
"objectReaderByClass"
,
readers
);
...
...
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