【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

相关推荐
晨曦中的暮雨14 分钟前
Virtual Thread 优化 Spring AI 阻塞式 LLM I/O:对照压测报告
java·并发·个人项目
AKA__Zas1 小时前
芝士算法(前缀和2.0)
java·数据结构·算法·leetcode·哈希算法·学习方法
caishenzhibiao1 小时前
降雨带波段点差 同花顺期货通指标
java·c语言·c#
七夜zippoe1 小时前
OpenClaw Prompt 工程:从角色设定到 Skill 封装的 Agent 输出质量方法论
java·服务器·prompt·openclaw·skill封装
rosmis1 小时前
agent各指标定义
android·java·开发语言
mifengxing1 小时前
Java 集合进阶(一)
java·开发语言·数据结构·复习笔记
令狐前生2 小时前
Intellij IDEA 2025 破解安装
java·ide·intellij-idea
zzzzzz3102 小时前
别让大模型直接碰业务:我在 Spring Boot 里给 AI 操作加了一道“可拒绝的闸门”
人工智能·spring boot·spring
数聚天成DeepSData2 小时前
数聚天成 DeepSData 数据价值落地实战指南
java·maven·devops
小小小米粒3 小时前
阿姆达尔定律(Amdahl‘s Law)
java·开发语言