Insert StringMessageConverter for SSE
Closes gh-24465
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.web.servlet.mvc.method.annotation;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
@@ -31,7 +30,6 @@ import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.StringHttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.context.request.ServletWebRequest;
|
||||
@@ -72,8 +70,8 @@ public class ResponseBodyEmitterReturnValueHandlerTests {
|
||||
@BeforeEach
|
||||
public void setup() throws Exception {
|
||||
|
||||
List<HttpMessageConverter<?>> converters = Arrays.asList(
|
||||
new StringHttpMessageConverter(), new MappingJackson2HttpMessageConverter());
|
||||
List<HttpMessageConverter<?>> converters =
|
||||
Collections.singletonList(new MappingJackson2HttpMessageConverter());
|
||||
|
||||
this.handler = new ResponseBodyEmitterReturnValueHandler(converters);
|
||||
this.request = new MockHttpServletRequest();
|
||||
|
||||
Reference in New Issue
Block a user