首页javajaxbJava HTML/XML - 如何catch jaxb catch exception如果在java类中没有找到字段

Java HTML/XML - 如何catch jaxb catch exception如果在java类中没有找到字段

我们想知道如何catch jaxb catch exception如果在java类中没有找到字段。

Java Model (Root)

import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Root { private String foo; public String getFoo() { return foo; } public void setFoo(String foo) { this.foo = foo; } }