How to add a specific field in Spring Data Rest?
问题 I am developing a web service using Spring Data Rest. public interface BookRepository extends PagingAndSortingRepository<Book, Long> { @Override @Query("select avg(rl.rating) as rating, b from ReadingList rl join rl.book b group by rl.book order by rating desc") Page<Book> findAll(Pageable pageable); } When I select in JPQL as above, 'avg (rl.rating) as rating' column does not have the name like the image below. enter image description here rating: 4.0 I would like to do this service. In