Skip to content

mongodb-developer/get-started-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get-Started Java

Repository to help getting started with MongoDB Java driver connecting to MongoDB Atlas.

Information

This Get-Started project uses MongoDB Java driver version 4.5.1 (sync) by default. Although you can change the driver version, the provided code example was only tested against the default version of MongoDB driver. There is no guarantee that the code sample will work for all possible versions of the driver.

Pre-requisites

Docker

Have Docker running on your machine. You can download and install from: https://docs.docker.com/install/

MongoDB Atlas

In order to execute the code example, you need to specify MONGODB_URI environment variable to connect to a MongoDB cluster. If you don't have any you can create one by signing up MongoDB Atlas Free-tier M0.

Execution Steps

Execute the helper shell script followed by the MongoDB URI that you would like to connect to.

./get-started.sh "mongodb+srv://usr:pwd@example.mongodb.net/dbname?retryWrites=true"

To use a different driver version, specify the driver version after the MongoDB URI. For example:

./get-started.sh "mongodb+srv://usr:pwd@example.mongodb.net/dbname?retryWrites=true" 4.3.0

Tutorials

About

This project is part of the MongoDB Get-Started code examples. Please see get-started-readme for more information.

Disclaimer

This software is not supported by MongoDB, Inc under any of their commercial support subscriptions or otherwise. Any usage is at your own risk.

About

Repository to help getting started with MongoDB Java driver connecting to MongoDB Atlas

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published