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
Post a Comment