Chethan M R
Chethan M R

Reputation: 23

I am trying to connect mongodb with spring boot. I am confused when to use which maven dependency amongst the following:

I am trying to connect mongodb with spring boot. I want to configure using AbstractMongoClientConfiguration, MongoConfigurationSupport abstract classes and MongoClient class and use MongoTemplate, MongoRepository and MongoClient. I am confused when to use which maven dependency amongst the following:

  1. org.mongodb mongodb-driver-sync
  2. org.mongodb mongo-java-driver
  3. org.springframework.data spring-data-mongodb
  4. org.springframework.boot spring-boot-starter-data-mongodb

Can someone please help?

Upvotes: 2

Views: 833

Answers (1)

Joel BEYA
Joel BEYA

Reputation: 36

Try this, according to Baeldung tutorial https://www.baeldung.com/spring-data-mongodb-tutorial

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-mongodb</artifactId>
    <version>3.0.3.RELEASE</version>
</dependency>

Upvotes: 2

Related Questions