Using Spring Data REST with Angular’s $resource object is very useful and convenient, but I’ve faced a problem with CRUD update. First you need to create such method while creating $resource object:
But when this method was called I got 405 Method Not Allowed
error. The problem is Spring expects to have an id in the URL. To add it modify creation of a $resource object:
Please note that @id
refers to the parameter defined above, so no underscore is needed.