Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

mongorepository spring boot custom query

public interface PersonRepository extends MongoRepository<Person, String>
// Geo-spatial repository queries
  // { 'location' : { '$near' : [point.x, point.y], '$maxDistance' : distance}}
  List<Person> findByLocationNear(Point location, Distance distance);
}
Source by docs.spring.io #
 
PREVIOUS NEXT
Tagged: #mongorepository #spring #boot #custom #query
ADD COMMENT
Topic
Name
4+5 =