【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

相关推荐
爪哇碎碎念28 分钟前
【Java】从一次 cache.get(key) 进去:缓存击穿一瞬间打出 200 次 DB,JDK 17 实测三种解法
java·redis·缓存
csdn_aspnet29 分钟前
Java 使总距离最短的最佳点位置(Optimum location of point to minimize total distance)
java·算法
源码_空间35 分钟前
基于Springboot的在线编程练习判题平台(源码+文档)
java·spring boot·后端
小手cool2 小时前
二分查找:在有序数组中查找最接近 target 的元素索引
java·数据结构·算法
李白的手机2 小时前
深入理解 Spring @RefreshScope:从入门用法到源码原理,再到举一反三实战扩展
java·后端·spring
深入云栈2 小时前
Netty 4.2.x 源码深度解析 (二十五):PoolThreadCache 与引用计数 —— 线程缓存与内存泄漏检测
java·后端·架构
砚底藏山河3 小时前
量化行情横截面中性化闭式与回归实现
android·java·python·金融·kotlin
Helix2504 小时前
JDK单元测试实战:JUnit 5与Mockito注解、断言、参数化测试、Mock注入完整指南
java·junit·单元测试·junit 5·mockito·mockmvc·参数化测试
李少兄4 小时前
Spring Boot 配置占位符与 JNI 原生库容器化适配解析
java·spring boot·后端
Javatutouhouduan4 小时前
阿里Java面试核心讲(2027最新版)
java·spring boot·mybatis·java面试·后端开发·java程序员·java八股文