Commit 4037f4ca by Spencer Gibb

Add initialization of JsonXStream back.

fixes gh-535
parent d72c9f0d
......@@ -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
......
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment