SmartMessageConverter.toMessage

A variant of {@link #toMessage(Object, MessageHeaders)} which takes an extra conversion context as an argument, allowing to take e.g. annotations on a return type into account. @param payload the Object to convert @param headers optional headers for the message (may be {@code null}) @param conversionHint an extra object passed to the {@link MessageConverter}, e.g. the associated {@code MethodParameter} (may be {@code null}} @return the new message, or {@code null} if the converter does not support the Object type or the target media type @see #toMessage(Object, MessageHeaders)

  1. MessageBase toMessage(Object payload, MessageHeaders headers, TypeInfo conversionHint)
    interface SmartMessageConverter
  2. alias toMessage = MessageConverter.toMessage

Meta