java - 在springboot rest api(postgresql)中搜索JSONObject
问题描述
我想基于存储在具有以下格式的数据库中的一些 JSON 数据执行搜索操作:
{
"id": "ae002e48-f540-44ac-9050-3bd24902a",
"type": "Devil",
"System": "not your system",
"dateCreated": "2012-12-12T15:22:53.798",
"meta":{
"key":123,
"life": "get a life",
"animal":"not dirty"
},
"item": null
}
那么,如何在postgresql数据库中的所有 JSON 中搜索所有动物都“不脏”的关键 metadata.animal?
PS:我想在获取请求期间执行搜索(例如对 /animal/search/meta/animal?animal=not+dirty 的获取请求应该搜索所有记录并显示所有带有 meta.animal=not dirty 的记录) .
解决方案
推荐阅读
- c# - 与 FrostBullet 碰撞时会随着时间的推移而减速
- python - 是否可以找到模块导入的来源?
- swift - 稍后根据条件更新 SKLabelNode 以具有不同的文本字段。Swift SpriteKit
- numpy - 在 Pyspark 中使用 UDF 后无法将数据帧写入配置单元表
- reactjs - 文档未定义 - 将 React Tooltip 库与 React Static 结合使用
- docker - 如何使用 webdevops/* 提供的容器?
- notifications - Cloudkit 新记录通知
- python - 文本分类 - 是否过拟合?我怎么证明?
- django - Django - 无法在没有错误的情况下删除或重命名模型中的字段(指定了未知字段)
- python - 我如何使用 selenium 在 python 中打印 instagram 回复消息