[英]Difference between DTO and Spring Data Projection in Spring Boot
I'm confused about DTO and Spring Data Projection, when I open an entity file there is an option to create DTO "Create DTO" and Spring Data Projection "Create Spring Data Projection" in Intelij IDEA IDE.
两者的作用和区别是什么? 何时在 DTO 和 Spring 数据投影之间使用它。 是否有参考以表格形式显示一对一的差异? 我用谷歌搜索,结果在两件事之间显得模棱两可
简单来说,一个DTO就是一个数据传输object,可以认为是一个接收参数。然而,Spring Data Projection返回Data。 当查询不匹配数据库中的所有字段时,例如某个字段的部分视图,使用 Spring 数据投影接收
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.