Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何控制在 Axis2 中序列化哪些字段?我有一些不想暴露给客户的字段(真正的 getter/setter 对)。此外,有些在我想要它们的地方被视为可空(例如,创建了一些IntSpecified 属性)。
我认为不幸的是没有注释可以将属性排除在序列化之外。
我认为您将需要创建数据传输对象 (DTO)。否则,您的核心业务对象和您作为 API 公开的对象之间将不会有一个清晰的分离。