There is already an attribute on the @RestResource annotation to disable a method. In the latest RC, that only affects query methods. If you want to create an issue in JIRA [1] for it, I can extend that switch to any crud methods as well.
You'd just override that method in your own repository interface and add @RestResource(exported=false) to it:
Code:
public interface MyEntityRepository extends CrudRepository<MyEntity,Long> {
@RestResource(exported = false)
@Override public void delete(Long id);
}
Right now the controller doesn't check for this annotation on crud methods, but it would be relatively easy to add. I can also create an issue if you don't want to. Just let me know so we don't have duplicates...
[1] - https://jira.springsource.org/browse/DATAREST