我有一个关于反序列化复合对象的问题。我的对象如下所示:
public class Outside
{
private String str1;
private Inside s;
}
public class Inside
{
private String str2;
public Inside(String str2)
{
this.field1 = str2;
}
}
当我想反序列化对 Json 的响应时
Outside o = wr.accept(MediaType.APPLICATION_JSON_TYPE).get(Outside .class);
我收到以下异常 ....ClientHandlerException: A message body reader for Java class Outside, Java type class Outside, and MIME media type application/json was not found
我不确定我做错了什么。