spring data rest - How can you selectively export PATCH, PUT and POST for a @RestRepositoryResource? -


i know possible use annotations prevent export of http methods given repository, e.g:

@repositoryrestresource public interface accountrepository extends pagingandsortingrepository<account, long> {      @override     @restresource(exported = false)     account save(account entity); } 

if understood documentation correctly save mapped post, put , patch. possible selectively prevent export of these individually? instance, in case want allow put prevent post.

it workaround makes override automatically generated crud methods (by spring data rest) own controllers:

    public class crudcontroller {         @requestmapping(value = "/save", method = {requestmethod.post, requestmethod.put})         public string save(model uimodel) {             // code here         }     } 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -