0

我们现在正在做 SOA 迁移,我们旧系统的架构是基于 spring 和 hibernate。我们在所有层中使用 PO(持久对象)。

面对 SOA 迁移,如果我们使用 DTO 进行远程过程调用,我们必须创建这么多的 DTO。

关于如何避免这种情况有什么建议?

4

1 回答 1

0

Develop a Canonical Model, probably the most important SOA pattern there is. - Define a representation using an XML Schema for that model. - Use jaxb to create the Java POJO representations. Once you have these you 'could' map these to your existing Persistent Objects and then round-trip until they are equivalent. Alternatively given you already use persistent object you could work bottom up with Jaxb, but in my experience that is more difficult/work intensive approach.

于 2012-06-13T12:07:19.583 回答