Jackson ignore all properties of superclass from external library

前端 未结 2 957
后悔当初
后悔当初 2020-12-20 15:07

I am developing using an ORM where I extend a base orm class to create tables.

For example:

public class Person extends DbItem {
    @JsonIgnore
           


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 15:25

    You want to do custom field level serialization. This will be a bit more work to maintain your code base, but is by far the simplest solution. See Jackson JSON custom serialization for certain fields for implementation details.

提交回复
热议问题