mongorepository spring boot documentation code example
Example 1: mongorepository spring boot custom query
public interface PersonRepository extends MongoRepository<Person, String>
List<Person> findByLocationNear(Point location, Distance distance);
}
Example 2: mongorepository spring boot custom query
public interface PersonRepository extends PagingAndSortingRepository<Person, String> {
List<Person> findByLastname(String lastname);
Page<Person> findByFirstname(String firstname, Pageable pageable);
Person findByShippingAddresses(Address address);
}