Don’t use Java 7 API in EmbeddedMongoAutoConfiguration
Closes gh-4630
This commit is contained in:
parent
c58ebae419
commit
91674b2c94
|
|
@ -157,7 +157,9 @@ public class EmbeddedMongoAutoConfiguration {
|
|||
|
||||
private InetAddress getHost() throws UnknownHostException {
|
||||
if (this.properties.getHost() == null) {
|
||||
return InetAddress.getLoopbackAddress();
|
||||
return InetAddress.getByAddress(Network.localhostIsIPv6()
|
||||
? new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
|
||||
: new byte[] { 127, 0, 0, 1 });
|
||||
}
|
||||
return InetAddress.getByName(this.properties.getHost());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue