JNDI DNS service provider settings These properties may not be supported in future releases.
---
sun.net.spi.nameservice.provider.<n>=<default|dns,sun|...> Specifies the name service provider that you can use. By default, Java will use the system configured name lookup mechanism, such as file, nis, etc. You can specify your own by setting this option. <n> takes the value of a positive number, it indicates the precedence order with a small number takes higher precendence over a bigger number. Aside from the default provider, the JDK includes a DNS provider named "dns,sun". Prior to JDK 7, the first provider that was successfully loaded was used. In JDK 7, providers are chained, which means that if a lookup on a provider fails, the next provider in the list is consulted to resolve the name.
---
sun.net.spi.nameservice.nameservers=<server1_ipaddr,server2_ipaddr ...> You can specify a comma separated list of IP addresses that point to the DNS servers you want to use. If the sun.net.spi.nameservice.nameservers property is not defined, then the provider will use any name servers already configured in the platform DNS configuration sun.net.spi.nameservice.provider.<n>=<default|dns,sun|...> 用于设置域名服务提供者 = default的时候调用系统自带的DNS = dns,sun的时候,会调用sun.net.spi.nameservice.nameservers=<server1_ipaddr,server2_ipaddr ...>指定的DNS来解析