Add `@NestedConfigurationProperty` to transport.

Needed in `EurekaClientConfigBean` because `CloudEurekaTransportConfig` is a separate class. Fixes gh-2138
parent 86b1f6ed
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
package org.springframework.cloud.netflix.eureka; package org.springframework.cloud.netflix.eureka;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.core.env.PropertyResolver; import org.springframework.core.env.PropertyResolver;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -33,6 +33,8 @@ import com.netflix.discovery.shared.transport.EurekaTransportConfig; ...@@ -33,6 +33,8 @@ import com.netflix.discovery.shared.transport.EurekaTransportConfig;
import lombok.Data; import lombok.Data;
import static org.springframework.cloud.netflix.eureka.EurekaConstants.DEFAULT_PREFIX;
/** /**
* @author Dave Syer * @author Dave Syer
*/ */
...@@ -57,6 +59,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig, EurekaConstan ...@@ -57,6 +59,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig, EurekaConstan
*/ */
private boolean enabled = true; private boolean enabled = true;
@NestedConfigurationProperty
private EurekaTransportConfig transport = new CloudEurekaTransportConfig(); private EurekaTransportConfig transport = new CloudEurekaTransportConfig();
/** /**
......
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