When using Objectmapper to convert the JSON to an object, call Mapper.readvalue (Jsonstr, Xwjuser.class), report the following error:
Com.fasterxml.jackson.databind.JsonMappingException:Can not construct instance of entity. Xwjuser:no suitable constructor found, can not deserialize fromObject Value (missingdefaultconstructor or creator, or perhaps need to add/enable type information?) at [Source: {"ID":1,"message":"Hello World","Sendtime":1525162183195,"intlist":NULL}; Line1, column:2] at com.fasterxml.jackson.databind.JsonMappingException. from(Jsonmappingexception.java:261) at Com.fasterxml.jackson.databind.DeserializationContext.instantiationException ( Deserializationcontext.java:1456) at Com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator ( Deserializationcontext.java:1012) at Com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault ( Beandeserializerbase.java:1203) at Com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject (Beandeserializer.java:314) at Com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (Beandeserializer.java:148) at Com.fasterxml.jackson.databind.objectmapper._readmapandclose (Objectmapper.java:3789) at Com.fasterxml.jackson.databind.ObjectMapper.readValue (Objectmapper.java:2833) at TESTJSON.TESTOBJECTMAPPER.TESTOBJ (Testobjectmapper.java: -) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
....
Workaround: In the Xwjuser entity class, add the parameterless constructor, you can solve
Objectmapper json to object error handling