【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

相关推荐
皮皮林5517 小时前
为什么越来越多人用 Spring AI ?
spring
兴趣互联7 小时前
jeecgboot nacos2.3.2 使用pgsql
java
hudd6688 小时前
JavaEE 初阶 - 文件操作和IO
java·开发语言·java-ee
Flynn Liang9 小时前
HikariCP 连接池不是越大越好:I/O 密集型 Java 服务的数据库容量工程
java·数据库·mysql·高并发·连接池·hikaricp·sql 优化
学长毕设9 小时前
基于SpringBoot社区快递驿站物流配送系统-附源码
java·spring boot·后端
Flynt9 小时前
Java4Shell 实测:EPYC 一跑就中招,关掉 Base64 硬件加速,1KB 解码慢 14 倍
java·安全·性能优化
Resean02239 小时前
Spring 源码分析(七)AOP 原理(上):代理的创建
java·后端·spring
Tangq一定可以的10 小时前
Spring AI Advisor 详解 - 给大模型调用加上“切面“,日志/过滤/记忆一键搞定
java·后端·spring
小巫编程室10 小时前
我造了一个 Java 能力包:让 AI 直接调用你的业务代码
java·前端·后端
深入云栈11 小时前
Netty 4.2.x 源码深度解析 (二十四):池化内存分配 —— PoolArena、PoolChunk 与 PoolSubpage
java·后端·架构