It's enough that you override delete method of your @RepositoryRestResource, like so:
@RepositoryRestResource public interface ProductRepository extends PagingAndSortingRepository<Product, Long> { List<Product> findByName(@Param("name") String name); @Modifying @Query("update Product p set deleted = true where p = :p") void delete(Product p); @Query("select p FROM Product p WHERE p.deleted = false") Page<Product> findAll(Pageable pageable); }