#### [可序列化的接口指南](//howtodoinjava.com/java/serialization/a-mini-guide-for-implementing-serializable-interface-in-java/ "A mini guide for implementing serializable interface in java")
Make sure you have defined a default constructor in your POJO class (e.g. `Employee.java` in our case). Jackson uses default constructor to create the instances of java class using reflection. If default constructor is not provided, then you will get `JsonMappingException` in runtime.
确保在 POJO 类中定义了默认的构造函数(例如,本例中为`Employee.java`)。 Jackson 使用默认构造函数通过反射来创建 Java 类的实例。 如果没有提供默认的构造函数,那么您将在运行时得到`JsonMappingException`。
`@XmlRootElement`将类或[枚举类型](https://howtodoinjava.com/java/enum/guide-for-understanding-enum-in-java/)映射到 XML 元素。 当使用`@XmlRootElement`注解注释顶级类或枚举类型时,则其值在 XML 文档中表示为 XML 元素。