jpa Specification 如何实现mysql jsonarry中的字段嵌套查询

myqsl 语句 select * from test where JSON_CONTAINS(a.department, JSON_OBJECT('id', 1234))
利用 Specification 如何拼接查询条件?

表头表头
iddepartment
1[{"id": 1233, "departmentName": "财务部"}, {"id": 1234, "departmentName": "市场"}]

在你的dao里面使用@Query注解就行了,他其实也是支持sql的,参考这篇文章
https://blog.csdn.net/qq_41473905/article/details/110748660