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)
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)