-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Documentation
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
It's not clear in the reference docs and perhaps Javadoc that you can do:
MongoClientSettings settings = MongoClientSettings.builder()
.credential(MongoCredential.createCredential(userName, password))
.applyConnectionString(new ConnectionString("mongodb://localhost,localhost:27018"))
.build();
MongoClient client = MongoClients.create(settings);
to apply a connection string without credentials to a MongoClientSettings with credentials.