Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create, update and Delete endpoints #5

Open
shapan1 opened this issue Mar 31, 2021 · 1 comment
Open

Create, update and Delete endpoints #5

shapan1 opened this issue Mar 31, 2021 · 1 comment
Assignees
Labels

Comments

@shapan1
Copy link

shapan1 commented Mar 31, 2021

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 :

  1. how the interface worked without an actual implementation?
  2. How can I create the other Create, update and delete endpoints?
@mechero mechero self-assigned this Apr 3, 2021
@mechero
Copy link
Owner

mechero commented Apr 3, 2021

Hi @shapan1,

  1. 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.
  2. The ReactiveSortingRepository that the code uses extends the ReactiveCrudRepository 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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants