2012-01-31 62 views

回答

1

我看到至少有兩個選項:

  • 使列private String content,並設置JSON裏面:entity.setContent(toJson(content))。您可以使用GSON或Jackson for toJson方法。

  • 使用custom hibernate @Type,並實現它以將字段序列化爲JSON。