mongorepository spring boot custom query

Solutions on MaxInterview for mongorepository spring boot custom query by the best coders in the world

showing results for - "mongorepository spring boot custom query"
Kaitlynn
27 May 2020
1public interface PersonRepository extends PagingAndSortingRepository<Person, String> {
2
3    List<Person> findByLastname(String lastname);
4
5    Page<Person> findByFirstname(String firstname, Pageable pageable);
6
7    Person findByShippingAddresses(Address address);
8
9}     
Santiago
12 Nov 2019
1public interface PersonRepository extends MongoRepository<Person, String>
2// Geo-spatial repository queries
3  // { 'location' : { '$near' : [point.x, point.y], '$maxDistance' : distance}}
4  List<Person> findByLocationNear(Point location, Distance distance);
5}