Document use of MongoClientSettings.applyConnectionString better

XMLWordPrintableJSON

    • 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.

            Assignee:
            Unassigned
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: