}
@Bean
- Consumer<String, ChatMessageTo> chatMessageChannelConsumer(
+ Consumer<String, AbstractTo> chatMessageChannelConsumer(
Properties defaultConsumerProperties,
ChatBackendProperties chatBackendProperties,
StringDeserializer stringDeserializer,
- JsonDeserializer<ChatMessageTo> messageDeserializer)
+ JsonDeserializer<AbstractTo> messageDeserializer)
{
Map<String, Object> properties = new HashMap<>();
defaultConsumerProperties.forEach((key, value) -> properties.put(key.toString(), value));
}
@Bean
- JsonDeserializer<ChatMessageTo> chatMessageDeserializer()
+ JsonDeserializer<AbstractTo> chatMessageDeserializer()
{
- JsonDeserializer<ChatMessageTo> deserializer = new JsonDeserializer<>();
+ JsonDeserializer<AbstractTo> deserializer = new JsonDeserializer<>();
deserializer.configure(
- Map.of(
- JsonDeserializer.USE_TYPE_INFO_HEADERS, false,
- JsonDeserializer.VALUE_DEFAULT_TYPE, ChatMessageTo.class,
- JsonDeserializer.TRUSTED_PACKAGES, getClass().getPackageName()),
+ Map.of(JsonDeserializer.TRUSTED_PACKAGES, getClass().getPackageName()),
false );
return deserializer;
}