The entity class ignores the serialization of the field

The entity class ignores the serialization of the field

Problems encountered in the project development process, the entity class has a field testName and the corresponding GETTER SETTER method, but not in the database this field, in the process of serialization project will complain, that we should ban serialized testName of
the entity , Just use the keyword transient to declare this field.

transient private String testName; 

Guess you like

Origin blog.csdn.net/ampsycho/article/details/77773934