【Spring连载】使用Spring Data访问 MongoDB(十四)----Mongodb特有的查询方法

【Spring连载】使用Spring Data访问 MongoDB(十四)----Mongodb特有的查询方法

  • 一、定义通用查询方法
  • 二、MongoDB特有的查询方法
    • [2.1 地理空间查询Geo-spatial Queries](#2.1 地理空间查询Geo-spatial Queries)
    • [2.2 基于JSON的查询方法和字段限制](#2.2 基于JSON的查询方法和字段限制)
    • [2.3 使用SpEL表达式的基于JSON的查询](#2.3 使用SpEL表达式的基于JSON的查询)
    • [2.4 全文检索查询](#2.4 全文检索查询)
    • [2.5 聚合方法Aggregation Methods](#2.5 聚合方法Aggregation Methods)
    • [2.6 Query by Example](#2.6 Query by Example)

一、定义通用查询方法

见定义查询方法。

二、MongoDB特有的查询方法

Most of the data access operations you usually trigger on a repository result in a query being executed against the MongoDB databases. Defining such a query is a matter of declaring a method on the repository interface, as the following example shows:

PersonRepository with query methods

2.1 地理空间查询Geo-spatial Queries

2.2 基于JSON的查询方法和字段限制

2.3 使用SpEL表达式的基于JSON的查询

2.4 全文检索查询

2.5 聚合方法Aggregation Methods

2.6 Query by Example

相关推荐
香蕉大香蕉(06敬畏市场)44 分钟前
MySQL 单点详解(01)
java·数据库·mysql·面试·博客·实习
LaughingZhu1 小时前
Product Hunt 热榜 2026-10-30:Empacer、Scape、Floot in ChatGPT
java·前端·数据库·人工智能·chatgpt·notion
niucloud-admin1 小时前
NIUCLOUD PHP SAAS上门家政使用文档:服务保障
java·开发语言·php
IT枫斗者枫哥2 小时前
CompletableFuture失败后返回空列表:异常没了,业务含义也变了
java·后端
知识搬运临时工2 小时前
一个模板把 AEM 拖进 Full GC 死亡螺旋:300% CPU、7 GB 堆、310 万行堆栈
java·aws
用户432935928052 小时前
CoAP还是MQTT:1万只Cat.1水表三个月带宽续航实测
java
知守观2 小时前
多模块架构演进:横向分层 vs 纵向领域,13 个真实项目的切分对照
java·后端·微服务
Java成神之路-2 小时前
Java String 为什么不可变?和 HashMap 到底有什么关系?
java
paopaokaka_luck2 小时前
基于springboot+vue的益暖微光公益服务平台(DeepSeek公益助手、善款信息追溯、志愿服务积分闭环、ECharts运营分析、活动状态自动流转)
java·前端·javascript·spring boot·mysql·架构·echarts
文丑颜不良啊2 小时前
LeetCode1401~1420题目解析
java·leetcode