full-reactive-stack
full-reactive-stack copied to clipboard
Create, update and Delete endpoints
Hi, I went through your course on educative.io. I saw how you created the mongo repository and loaded data into the Mongo instance. However, I wanted to know :
- how the interface worked without an actual implementation?
- How can I create the other Create, update and delete endpoints?
Hi @shapan1,
- The interface doesn't need an implementation because it uses Spring Data JPA's Query Methods. In short, this means the name of the method is translated to a query by Spring.
- The
ReactiveSortingRepository
that the code uses extends theReactiveCrudRepository
interface. This one has methods to create, update, and delete entities. You can check the docs here.
If you want to know more about Spring Data and how it integrates with Spring Boot in a microservices architecture, let me recommend you my book Learn Microservices with Spring Boot.
In any case, feel free to ask as many questions as you need 😄