-
Oct 6th, 2012, 09:42 AM
#1
Combining Spring-Data-REST and URI templates
Hi there,
I wonder if it is possible to use Spring-Data-REST with URI-Templates.
As I understand it REST creates repositories for my entities and I can map the repositories with @RestResource.
I got this running and it works fine.
Is it now possible to combine REST with URI templates?
If for example I have an entity "folder" that contains a list of "file" objects and I want to add a new file to a folder, with SPRING REST I would create a new "file" by POSTing in the "files" repository and then update the "folder" by PUTting the folder in the folder repository to include the new file.
Is there a better way to do this?
Could I define a URI like /folder/{id}/files and create a new file there by POSTing that would be automatically added to the files and a reference added to the foder?
I thought about running two servlets, one with Spring DATA REST and one with traditional MVC. Would this be an option to provide such a functionality?
Thanks
Dominik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules