@PUT @Path("/{id:[0-9][0-9]*}") @Consumes("application/json") public Response update(Lista entity) { listaRepository.persist(entity); return Response.noContent().build(); }
@POST @Consumes("application/json") public Response create(Lista entity) { listaRepository.persist(entity); return Response.created( UriBuilder.fromResource(ListaEndpoint.class) .path(String.valueOf(entity.getId())) .build()) .build(); }