Ok, the problem was this method:
@GetMapping("/{id}")
public ResponseEntity<PlanDeEntrenamiento> getPlanes(@PathVariable String id) {
PlanDeEntrenamiento planDeEntrenamiento = planDeEntrenamientoDAO.findById(id).orElseThrow();
return ResponseEntity.ok(planDeEntrenamiento);
}
I have deleted it because I see there is no need for it, I had it because some test I did before and then didn't delete it. After deleting it, every put or patch to "/{id}"
started working again. However, if someone can explain this to me that would be helpful.