How to make BlazeDS ignore properties?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 15:30:11
Cornel Creanga

Besides transient / marshaller you can implement the Externalizable interface and create your custom serialization.

See serialization rules

All the rules for BlazeDS serialization are here:

http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.html

Here is a quote: "Fields that are static, transient, or nonpublic, as well as bean properties that are nonpublic or static, are excluded."

So if you can make your id property fit that criteria it will be excluded. Another option would be to create a custom serializer that overtly does not include your id property.

All the best,

~harris

It maybe a little bit old, but it could help some : there is a nice ticket about excluding properties from Java to Flex via BlazeDS

EDIT : a better soluce, it's to use the @AmfIgnore (or @AmfIgnoreField if your serialization is directly on the fields) annotation present in the spring-flex-core.jar (I've used the 1.5.2-RELEASE)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!