Home > Back-end >  Turn the JPA using mysql distance function problem
Turn the JPA using mysql distance function problem

Time:09-17

Spring data jpa using MySQL distance function
PageRequest pageable=PageRequest) of (
0,
20
Sort. Direction. ASC,
"The st_distance (point (longitude and latitude), point (' 120.38 ', '37.94'))"
)
List the List=mUserRepo. The.findall (query, pageable). The content
As shown in the code, the query is a query conditions, can't insert the st_distance, write SQL can be used,
  • Related