Issue with serializing Hibernate objects using XStream

前端 未结 6 1567
南笙
南笙 2021-02-04 19:52

I\'ve been facing this issue where, the hibernate objects on serialization produces unexpect xmls containing all the instrumented code from Hibernate.

We did some cleani

6条回答
  •  一个人的身影
    2021-02-04 20:29

    I faced a similar problem although Im not using hibernate. I looked at the enitity-pruner but its not quite what i was looking for as I was looking for a more simpler solution.

    I came up with a very simple solution using reflection that deproxies CGLIB enhaned objects like a charm.

    please visit http://www.anzaan.com/2010/06/serializing-cglib-enhanced-proxy-into-json-using-xstream/ for example and code.

提交回复
热议问题