In mongodb/mongo-java-driver, class com.mongodb.Mongo.java don't support IPv6.
The issue is when I use string host with ipv6 address and mongo options with method:
@Deprecated
public Mongo( String host , MongoOptions options )
throws UnknownHostException {
this( new ServerAddress( host ) , options );
}
-> It cannot parse IPv6 address.
I try to customize class Mongo as:
public Mongo( String host , MongoOptions options )
throws UnknownHostException {
this( new ServerAddress(InetAddress.getByName(host)) , options );
}
-> I can work with IPv6 address directly.
Please give to your comment and how to fix it in this case.
Thanks
There are no Sub-Tasks for this issue.