|
17 | 17 | package org.springframework.web.socket.adapter;
|
18 | 18 |
|
19 | 19 | import java.nio.ByteBuffer;
|
20 |
| - |
21 | 20 | import javax.websocket.DecodeException;
|
22 | 21 | import javax.websocket.Decoder;
|
23 | 22 | import javax.websocket.EncodeException;
|
|
28 | 27 | import org.junit.Rule;
|
29 | 28 | import org.junit.Test;
|
30 | 29 | import org.junit.rules.ExpectedException;
|
| 30 | + |
31 | 31 | import org.springframework.beans.factory.annotation.Autowired;
|
32 | 32 | import org.springframework.context.annotation.Bean;
|
33 | 33 | import org.springframework.context.annotation.Configuration;
|
34 | 34 | import org.springframework.core.convert.ConversionService;
|
35 | 35 | import org.springframework.core.convert.ConverterNotFoundException;
|
36 | 36 | import org.springframework.core.convert.converter.Converter;
|
37 |
| -import org.springframework.core.convert.support.ByteBufferConverter; |
| 37 | +import org.springframework.core.convert.support.DefaultConversionService; |
38 | 38 | import org.springframework.core.convert.support.GenericConversionService;
|
39 | 39 | import org.springframework.web.context.WebApplicationContext;
|
40 | 40 | import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
@@ -188,8 +188,7 @@ public static class Config {
|
188 | 188 |
|
189 | 189 | @Bean
|
190 | 190 | public ConversionService webSocketConversionService() {
|
191 |
| - GenericConversionService conversionService = new GenericConversionService(); |
192 |
| - conversionService.addConverter(new ByteBufferConverter(conversionService)); |
| 191 | + GenericConversionService conversionService = new DefaultConversionService(); |
193 | 192 | conversionService.addConverter(new MyTypeToStringConverter());
|
194 | 193 | conversionService.addConverter(new MyTypeToBytesConverter());
|
195 | 194 | conversionService.addConverter(new StringToMyTypeConverter());
|
|
0 commit comments