Link Search Menu Expand Document

The best way to set the connection to a MongoDB database when using Spring is to set the value of the property:

Sometimes you’ll be provided with a connection URI such as this one:


It is important to note that <username>, <password> and <dbname> need to be replaced with actual values that you would be supplied with separately.

When you replace the values, do not include the <> characters.