|
|
@ -21,6 +21,8 @@ import java.util.concurrent.ConcurrentMap; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import lombok.SneakyThrows; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigureBefore; |
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigureBefore; |
|
|
@ -45,10 +47,9 @@ import com.netflix.appinfo.EurekaInstanceConfig; |
|
|
|
import com.netflix.appinfo.InstanceInfo; |
|
|
|
import com.netflix.appinfo.InstanceInfo; |
|
|
|
import com.netflix.discovery.EurekaClient; |
|
|
|
import com.netflix.discovery.EurekaClient; |
|
|
|
import com.netflix.discovery.EurekaClientConfig; |
|
|
|
import com.netflix.discovery.EurekaClientConfig; |
|
|
|
|
|
|
|
import com.netflix.discovery.converters.JsonXStream; |
|
|
|
import com.netflix.discovery.converters.XmlXStream; |
|
|
|
import com.netflix.discovery.converters.XmlXStream; |
|
|
|
|
|
|
|
|
|
|
|
import lombok.SneakyThrows; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author Dave Syer |
|
|
|
* @author Dave Syer |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -72,6 +73,8 @@ public class EurekaClientAutoConfiguration implements ApplicationListener<Parent |
|
|
|
DataCenterAwareJacksonCodec.init(); |
|
|
|
DataCenterAwareJacksonCodec.init(); |
|
|
|
XmlXStream.getInstance().setMarshallingStrategy( |
|
|
|
XmlXStream.getInstance().setMarshallingStrategy( |
|
|
|
new DataCenterAwareMarshallingStrategy()); |
|
|
|
new DataCenterAwareMarshallingStrategy()); |
|
|
|
|
|
|
|
JsonXStream.getInstance().setMarshallingStrategy( |
|
|
|
|
|
|
|
new DataCenterAwareMarshallingStrategy()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|