Installation
The recommended way to get started with the Scala driver in your project is by using a dependency management system. To manually download the MongoDB Scala driver, see the Scala driver Maven repository.
The following sections contain the Reactive Streams-based Scala implementation for asynchronous stream processing with non-blocking back pressure.
Scala 2.12 Based Driver
If you are using Maven to manage your
packages, add the following entry to your pom.xml
dependencies list:
<dependencies> <dependency> <groupId>org.mongodb.scala</groupId> <artifactId>mongo-scala-driver_2.12</artifactId> <version>5.2.1</version> </dependency> </dependencies>
If you are using sbt to manage your
packages, add the following entry to your build.sbt
file:
libraryDependencies += "org.mongodb.scala" %% "mongo-scala-driver" % "5.2.1"
Scala 2.11 Based Driver
If you are using Maven to manage your
packages, add the following entry to your pom.xml
dependencies list:
<dependencies> <dependency> <groupId>org.mongodb.scala</groupId> <artifactId>mongo-scala-driver_2.11</artifactId> <version>5.2.1</version> </dependency> </dependencies>
If you are using sbt to manage your
packages, add the following entry to your build.sbt
file:
libraryDependencies += "org.mongodb.scala" %% "mongo-scala-driver" % "5.2.1"