JsonMappingException: No suitable constructor found

后端 未结 4 821
既然无缘
既然无缘 2020-12-18 08:34

I am implementing a firebase example as given in their documentations. I am facing this error:

com.fasterxml.jackson.databind.JsonMappingException: No

4条回答
  •  执念已碎
    2020-12-18 09:24

    Add a constructor in line of:

    public BlogPost(String author,String title) {
        this.author=author;
        this.title=title;
    }
    

    However it is also possible you need to redefine BlogPost to:

    class BLogPost {
      public BlogPost() { }
      String postId;
      List someObject;
      Getters/setters
    }
    

    In which SomeObject is your current BLogPost class.

提交回复
热议问题