Class CustomMimeTypeConverter

java.lang.Object
org.springframework.cloud.stream.converter.CustomMimeTypeConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<String,org.springframework.util.MimeType>

public class CustomMimeTypeConverter extends Object implements org.springframework.core.convert.converter.Converter<String,org.springframework.util.MimeType>
A custom converter for MimeType that accepts a plain java class name as a shorthand for application/x-java-object;type=the.qualified.ClassName.
Author:
Eric Bottard, David Turanski
  • Constructor Details

    • CustomMimeTypeConverter

      public CustomMimeTypeConverter()
  • Method Details

    • convert

      public org.springframework.util.MimeType convert(String source)
      Specified by:
      convert in interface org.springframework.core.convert.converter.Converter<String,org.springframework.util.MimeType>