Source:
<code>public void initWithNiwsConfig(IClientConfig clientConfig) { clientName = clientConfig.getClientName(); vipAddresses = clientConfig.resolveDeploymentContextbasedVipAddresses(); if (vipAddresses == null && ConfigurationManager.getConfigInstance().getBoolean("DiscoveryEnabledNIWSServerList.failFastOnNullVip", true)) { throw new NullPointerException("VIP address for client " + clientName + " is null"); } isSecure = Boolean.parseBoolean(""+clientConfig.getProperty(CommonClientConfigKey.IsSecure, "false")); prioritizeVipAddressBasedServers = Boolean.parseBoolean(""+clientConfig.getProperty(CommonClientConfigKey.PrioritizeVipAddressBasedServers, prioritizeVipAddressBasedServers)); datacenter = ConfigurationManager.getDeploymentContext().getDeploymentDatacenter(); targetRegion = (String) clientConfig.getProperty(CommonClientConfigKey.TargetRegion); <START> shouldUseIpAddr = ConfigurationManager.getConfigInstance().getBoolean("DiscoveryEnabledNIWSServerList.useIpAddr", false); <END> if(clientConfig.getPropertyAsBoolean(CommonClientConfigKey.ForceClientPortConfiguration, false)){ if(isSecure){ if(clientConfig.containsProperty(CommonClientConfigKey.SecurePort)){ overridePort = clientConfig.getPropertyAsInteger(CommonClientConfigKey.SecurePort, DefaultClientConfigImpl.DEFAULT_PORT); shouldUseOverridePort = true; }else{ logger.warn(clientName + " set to force client port but no secure port is set, so ignoring"); } }else{ if(clientConfig.containsProperty(CommonClientConfigKey.Port)){ overridePort = clientConfig.getPropertyAsInteger(CommonClientConfigKey.Port, DefaultClientConfigImpl.DEFAULT_PORT); shouldUseOverridePort = true; }else{ logger.warn(clientName + " set to force client port but no port is set, so ignoring"); } } } }</code><technical_language>This expect a global property for Ribbon clients in JVM IP address. However, able set this property for individual clients. works follow pattern of properties defined in DefaultClientConfigImpl: 1. Defined property a key in CommonClientConfigKey 2. Load default (which "false") in DefaultClientConfigImpl 3. clientConfig.getProperty() access I suggest name "UseIPAddrForServer" for new property</technical_language>

Target:
public void initWithNiwsConfig(IClientConfig clientConfig) { clientName = clientConfig.getClientName(); vipAddresses = clientConfig.resolveDeploymentContextbasedVipAddresses(); if (vipAddresses == null && ConfigurationManager.getConfigInstance().getBoolean("DiscoveryEnabledNIWSServerList.failFastOnNullVip", true)) { throw new NullPointerException("VIP address for client " + clientName + " is null"); } isSecure = Boolean.parseBoolean(""+clientConfig.getProperty(CommonClientConfigKey.IsSecure, "false")); prioritizeVipAddressBasedServers = Boolean.parseBoolean(""+clientConfig.getProperty(CommonClientConfigKey.PrioritizeVipAddressBasedServers, prioritizeVipAddressBasedServers)); datacenter = ConfigurationManager.getDeploymentContext().getDeploymentDatacenter(); targetRegion = (String) clientConfig.getProperty(CommonClientConfigKey.TargetRegion); shouldUseIpAddr = clientConfig.getPropertyAsBoolean(CommonClientConfigKey.NIWSServerListDiscoveryUseIpAddress, false); if (!shouldUseIpAddr) { shouldUseIpAddr = ConfigurationManager.getConfigInstance().getBoolean("ribbon." + CommonClientConfigKey.NIWSServerListDiscoveryUseIpAddress.key(), false); } if(clientConfig.getPropertyAsBoolean(CommonClientConfigKey.ForceClientPortConfiguration, false)){ if(isSecure){ if(clientConfig.containsProperty(CommonClientConfigKey.SecurePort)){ overridePort = clientConfig.getPropertyAsInteger(CommonClientConfigKey.SecurePort, DefaultClientConfigImpl.DEFAULT_PORT); shouldUseOverridePort = true; }else{ logger.warn(clientName + " set to force client port but no secure port is set, so ignoring"); } }else{ if(clientConfig.containsProperty(CommonClientConfigKey.Port)){ overridePort = clientConfig.getPropertyAsInteger(CommonClientConfigKey.Port, DefaultClientConfigImpl.DEFAULT_PORT); shouldUseOverridePort = true; }else{ logger.warn(clientName + " set to force client port but no port is set, so ignoring"); } } } }