This is my route :
route().from("/customers/{id}")
.on(RequestMethod.GET)
.consumes(JSON).produces(JSON)
.to(CustomerEndpoint.class)
.findById(Long.parseLong(param("id"));
This the method of my endpoint :
public Response findById(Long id)
{
Customer entity = em.find(Customer.class, id);
if (entity == null)
{
return Response.status(Status.NOT_FOUND).build();
}
return Response.ok(entity).build();
}
This is the stackTrace :
'argument type mismatch': java.lang.IllegalArgumentException: argument type mismatch
I tried to overload in ag controller the static param method to also support a type and doing this :
param("id", Long.class)
But without any result