com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field 异常

1, com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field 异常

mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

2,在需要转化的对象的类中添加注解,注解信息如下:

 

@JsonIgnoreProperties(ignoreUnknown = true)

 

参考:https://blog.csdn.net/qq_30739519/article/details/51273544

 

posted @ 2021-12-10 12:14  规格严格-功夫到家  阅读(167)  评论(0编辑  收藏  举报