DOP实现的Serializable接口 [英] DTO implementation of Serializable interface

查看:184
本文介绍了DOP实现的Serializable接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否必须为Java DTO / Model对象实现Serialize?如果是这样的话?如果不是对性能的影响等等?

Is it mandatory to implement Serialize for Java DTO/Model objects? If so why? If not whats the impact on performance etc?

推荐答案

DTO通常是数据传输对象。它不必使用Java序列化,但如果不是,则需要遵循其他约定。

A DTO is normally a Data Transfer Object. It doesn't have to use Java Serialization, but if it doesn't it needs to follow some other convention.

这不是性能问题,就好像你在使用它一样Java序列化很可能必须是Serializable(或Externalizable仍然可序列化)

Its not a matter of performance as if you are using Java Serialization it most likely has to be Serializable (or Externalizable which is still Serializable)

这篇关于DOP实现的Serializable接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆