Rest Controllers vs spring-data-rest RepositoryRestResource
I know this might feel like a duplicate of this. When to use @RestController vs @RepositoryRestResource But I have a few things which were not addressed in that question. With @RepositoryRestResource , every method is by default exposed. Which I feel is a bit annoying. Correct me if I am wrong here. For example in the below case @RepositoryRestResource public interface ProductRepository extends MongoRepository<Product, String> {} If I want only findAll() and findOne() to be exposed and not any other methods, especially delete. To achieve this I need to do something like this