Details
-
Improvement
-
Resolution: Unresolved
-
Minor - P4
-
None
-
None
-
None
Description
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.