【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

相关推荐
karry_k11 小时前
MyBatis批量insert-select踩坑:useGeneratedKeys=true 可能让PostgreSQL返回大量插入结果
java·后端
karry_k11 小时前
PostgreSQL 在 MyBatis 中执行正常 SQL 失效:一次 DELETE USING 踩坑记录
java·后端
SamDeepThinking14 小时前
从源码到代码:MyBatis-Flex 与 MyBatis-Plus 的逐项对比
java·后端·程序员
她的男孩17 小时前
Spring Boot 接 Flowable 工作流:用 3 个注解搭一个请假审批流程
java·后端·架构
荣码19 小时前
LLM结构化输出:让AI返回JSON而不是废话,我踩了4个坑
java·python
葫芦和十三20 小时前
图解 MongoDB 25|分片架构三件套:mongos、config server 和 shard
后端·mongodb·agent
plainGeekDev20 小时前
Gson → kotlinx.serialization
android·java·kotlin
葫芦和十三1 天前
图解 MongoDB 26|片键设计:决定集群命运的一个决定
后端·mongodb·agent