@Configuration
public static class Config {
@Bean
public ConversionService webSocketConversionService() {
GenericConversionService conversionService = new DefaultConversionService();
conversionService.addConverter(new MyTypeToStringConverter());
conversionService.addConverter(new MyTypeToBytesConverter());
conversionService.addConverter(new StringToMyTypeConverter());
conversionService.addConverter(new BytesToMyTypeConverter());
return conversionService;
}