13

spring boot写接口,dto和vo一般怎么用?

 3 years ago
source link: https://www.oschina.net/question/2771565_2320740
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
spring boot写接口,dto和vo一般怎么用?
xiaokek
昨天 09:21

别搞这些花里胡哨的 都用map

xiaokek
昨天 16:36
回复 @名字无法识别 : 你还真别说,还真有这样的方法,抽象层次很高 DispatcherServlet 的void doService(HttpServletRequest request, HttpServletResponse response),request里面可以拿到任何参数,response写回任何响应
名字无法识别
昨天 16:19
回复 @漠孤烟 : 终极interface,就一个方法 Map<Object,Object> doAnything(Map<Object,Object> params);就这么野,注释://终极抽象,啥都能干,具体干啥,自己一行一行读代码去~~~
xiaokek
昨天 10:44
回复 @漠孤烟 : entity+dto只不过是骗自己罢了 你无论是entity还是map,到前端js,统统丢失定义,都是一顿map猛如虎
漠孤烟
昨天 10:06
Map一时爽,重构火zang场。 返回Map在我们团队是绝对禁止的。 entity + dto就可以了,dto用于接收前端的值,传值给service,返回前端,一个entity可能有多个不同的dto。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK