Let\'s say I have a repository like:
public interface MyRepository extends PagingAndSortingRepository { @Query(\"....\") Page<
You could use @ControllerAdvice and render the content your way. Here is tutorial if you need know how to work on ControllerAdvice, just remember to return HttpEntity
ControllerAdvice
HttpEntity