Reputation: 77
I am trying to update an entity from my Oracle database using a Spring RestController. Whether I use PostMapping or PutMapping on my controller method, the effect is the same on the entity, only the field I want to update gets updated and everything is fine. What is the real difference between the two request methods? Is it only for a clearer description on the controller method?
Update : it seems even if I use a GetMapping, my entity updates correctly. I am really starting to think that the request is getting handled in the Service layer and the request annotation is only for a clearer view on the controller method, but I could be wrong. Really curious for an explanation. Thank you!
Thank you!
Upvotes: 4
Views: 21528