How to set typeIdPropertyName in MappingJackson2MessageConverter
The converter expects the sender to provide type information for the conversion in a message property.
String typeId = message.getStringProperty(this.typeIdPropertyName);
The typeId can be a class name, or a key for an entry in the typeId mapping map.
If your message does not contain any type information, you need to subclass the converter and override getJavaTypeForMessage()
to return a Jackson JavaType
for the target class, e.g.:
return TypeFactory.defaultInstance().constructType(Foo.class);
If it's a constant and not dependent on some information in the message, you can create a static field in your subclass.