[JAVA-2975] Document use of MongoClientSettings.applyConnectionString better Created: 12/Sep/18  Updated: 30/Mar/22

Status: Backlog
Project: Java Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.


Generated at Thu Feb 08 08:58:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.