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
4037f4ca
Commit
4037f4ca
authored
Sep 10, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initialization of JsonXStream back.
fixes gh-535
parent
d72c9f0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
EurekaClientAutoConfiguration.java
...k/cloud/netflix/eureka/EurekaClientAutoConfiguration.java
+5
-2
EurekaServerInitializerConfiguration.java
...x/eureka/server/EurekaServerInitializerConfiguration.java
+6
-6
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.java
View file @
4037f4ca
...
...
@@ -21,6 +21,8 @@ import java.util.concurrent.ConcurrentMap;
import
javax.annotation.PostConstruct
;
import
lombok.SneakyThrows
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.AutoConfigureBefore
;
...
...
@@ -45,10 +47,9 @@ import com.netflix.appinfo.EurekaInstanceConfig;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.discovery.EurekaClient
;
import
com.netflix.discovery.EurekaClientConfig
;
import
com.netflix.discovery.converters.JsonXStream
;
import
com.netflix.discovery.converters.XmlXStream
;
import
lombok.SneakyThrows
;
/**
* @author Dave Syer
*/
...
...
@@ -72,6 +73,8 @@ public class EurekaClientAutoConfiguration implements ApplicationListener<Parent
DataCenterAwareJacksonCodec
.
init
();
XmlXStream
.
getInstance
().
setMarshallingStrategy
(
new
DataCenterAwareMarshallingStrategy
());
JsonXStream
.
getInstance
().
setMarshallingStrategy
(
new
DataCenterAwareMarshallingStrategy
());
}
@Bean
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerInitializerConfiguration.java
View file @
4037f4ca
...
...
@@ -58,6 +58,7 @@ import org.springframework.web.context.ServletContextAware;
import
com.netflix.blitz4j.DefaultBlitz4jConfig
;
import
com.netflix.blitz4j.LoggingConfiguration
;
import
com.netflix.discovery.converters.JsonXStream
;
import
com.netflix.discovery.converters.XmlXStream
;
import
com.netflix.eureka.AbstractInstanceRegistry
;
import
com.netflix.eureka.EurekaBootStrap
;
...
...
@@ -145,14 +146,13 @@ public class EurekaServerInitializerConfiguration implements ServletContextAware
// ignore
}
LoggingConfiguration
.
getInstance
().
configure
();
EurekaServerConfigurationManager
.
getInstance
()
EurekaServerConfigurationManager
.
getInstance
()
.
setConfiguration
(
EurekaServerInitializerConfiguration
.
this
.
eurekaServerConfig
);
XmlXStream
.
getInstance
()
.
setMarshallingStrategy
(
new
DataCenterAwareMarshallingStrategy
());
XmlXStream
.
getInstance
().
setMarshallingStrategy
(
new
DataCenterAwareMarshallingStrategy
());
JsonXStream
.
getInstance
()
.
setMarshallingStrategy
(
new
DataCenterAwareMarshallingStrategy
());
DataCenterAwareJacksonCodec
.
init
();
EurekaServerInitializerConfiguration
.
this
.
applicationContext
.
publishEvent
(
new
EurekaRegistryAvailableEvent
(
...
...
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