I am using the Jax-Rs and JPA implementing REST Webservice,I wanna delete the resource with @DELETE,this is my code
@DELETE
@Path("/list/{id}")
public void delete(@PathParam("id") String id) {
Query query = helper.getEntityManager().createQuery("Delete from CtmOrderEntity c where c.id=?1");
query.setParameter(1, id);
Object result = query.getSingleResult();
int update = query.executeUpdate();
System.out.println("Delete resutl" + result);
System.out.println("Delete signal" + update);
}
Then the console prints the error:
No resource method found for GET, return 405 with Allow header
I could not resolve the problem,Does anyone have any ideas with me?Thx.