1
votes

when I try to import MongoDB repository, IDE gives an error as shown in the image and cannot extends the class I created I'm using Importing MongoDB to the spring-boot application org.springframework.boot spring-boot-starter-parent 2.0.3.RELEASE

1
Did you use @EnableMongoRepositories in your configuration class? - Constantin Beer
I tried to add the annotation but the ide returned an error and suggested me to use JPA repository - Mohammed Esa
Solved thank you very much - Mohammed Esa
Glad it helped :) - Constantin Beer

1 Answers

0
votes

You have provided with less information but here is the solution for your problem:

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>

I think that you haven't added dependency in your pom.xml