Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion source/fundamentals/connection/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
Connect to MongoDB
==================

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: connection string, URI, Atlas, code example

In this guide, you can learn how to connect to a
`MongoDB Atlas deployment <https://www.mongodb.com/docs/atlas>`__,
a MongoDB instance, or a replica set using the {+driver-short+}.
Expand Down Expand Up @@ -178,7 +185,7 @@ class. Select the tab that corresponds to your preferred class.

.. code-block:: java

ConnectionString connectionString = new ConnectionString("mongodb://host1:27017,host2:27017,host3:27017/");
ConnectionString connectionString = new ConnectionString("mongodb://host1:27017,host2:27017,host3:27017");
MongoClient mongoClient = MongoClients.create(connectionString);

.. tab:: MongoClientSettings
Expand Down
20 changes: 20 additions & 0 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ What's New

Learn what's new in:

* :ref:`Version 5.2 <version-5.2>`
* :ref:`Version 5.1.1 <java-version-5.1.1>`
* :ref:`Version 5.1 <version-5.1>`
* :ref:`Version 5.0 <version-5.0>`
Expand All @@ -37,6 +38,25 @@ Learn what's new in:
* :ref:`Version 4.1 <version-4.1>`
* :ref:`Version 4.0 <version-4.0>`

.. _version-5.2:

What's New in 5.2
-----------------

New features of the 5.2 driver release include:

- A forward-slash (``/``) character between the host names and client options in a
connection URI is optional. The driver parses the following connection URI
examples in the same way:

.. code-block:: java

// Connection URI with delimiting forward-slash
String uri = "mongodb://example.com/?w=majority";

// Connection URI without delimiting forward-slash
String uri = "mongodb://example.com?w=majority";

.. _java-version-5.1.1:

What's New in 5.1.1
Expand Down