From the course: Creating Your First Spring Boot Microservice

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Spring Data MongoDB repositories

Spring Data MongoDB repositories

From the course: Creating Your First Spring Boot Microservice

Start my 1-month free trial

Spring Data MongoDB repositories

- [Narrator] Okay and now we are going to look at the differences in the repo and service folder by migrating to Spring Data MongoDB. In our repo folder we have changes in the tour rating repository and the tour repository and you'll notice that there was no changes made to the tour package repository. Here it is right here. And we're still extending from Crud repository. Our parameters are the same, and our searches are the same. It's just, Spring Data knows that it's a different repository but we're going to deal with it in the same way. And now, we're going to look at the tour repository. So, the main difference here, well, there's two main differences. One is because the string is an ID, not integer. So, that's going to change where we do delete by ID, we're overriding that. That now has to be a string. And, we have this new method which I name find summary by tour package code. And this is going to be the…

Contents