如果返回的JSON是个集合,而且集合中包含着集合,怎么配置result中的includeProperties??
如返回的teachers是一个List<Teacher>,包括着studentSet,studentSet是一个Set<Student>
如果只想取得studentSet中的每一个Student对象的姓名(student.name),includeProperties怎么配置?
我试着如下,不行,什么都不会返回,感觉从逻辑上应该没有错误.
teachers\[\d+\]\.studentSet\[\d+\]\.name
如果是这样,会返回所有的Student对象属性
teachers\[\d+\]\.studentSet.*
这不是我需要的!!!!!!
如返回的teachers是一个List<Teacher>,包括着studentSet,studentSet是一个Set<Student>
如果只想取得studentSet中的每一个Student对象的姓名(student.name),includeProperties怎么配置?
我试着如下,不行,什么都不会返回,感觉从逻辑上应该没有错误.
teachers\[\d+\]\.studentSet\[\d+\]\.name
如果是这样,会返回所有的Student对象属性
teachers\[\d+\]\.studentSet.*
这不是我需要的!!!!!!
本文探讨了如何正确配置JSON集合属性的includeProperties,以确保只获取特定字段,例如学生姓名。文章通过具体示例展示了配置方法,并讨论了常见问题。
1303

被折叠的 条评论
为什么被折叠?



