[SOLVED]
I've resolved creating a Bean of type ObjectMapper instead of passing it to the JsonSerializer constructor during the DefaultKafkaProducerFactory Bean definition.
@Configuration
public class ObjectMapperConfig {
@Bean
@Primary
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
return mapper;
}
}