How to Selectively Expose CRUD Operations

In order to selectively expose CRUD operations, we need to define an intermediate interface, annotated as below:

@NoRepositoryBeaninterface IntermediateRepository extends Repository {   //  add here the selected CRUD, for example we add only findOne()   T findOne(ID id);}

Further, write your repository as follows:

@Repositoryinterface ProductRepository extends IntermediateRepository {  // only findOne() is visible}
Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: