Align MVC handling between Spring 4 and Spring 5
A Spring Boot 2.0 app should behave the same as a Spering Boot 1.5 app with this change. The key thing was to change the return type of the FunctionController and move the computation of single valuedness for the output there (instead of trying to do it in the return value handler, which isn't used in Spring 5).
This commit is contained in:
@@ -53,10 +53,9 @@ public class SampleApplicationTests {
|
||||
|
||||
@Test
|
||||
public void single() {
|
||||
// TODO: make this return a single value
|
||||
assertThat(new TestRestTemplate().postForObject(
|
||||
"http://localhost:" + port + "/uppercase", "{\"value\":\"foo\"}",
|
||||
String.class)).isEqualTo("[{\"value\":\"FOO\"}]");
|
||||
String.class)).isEqualTo("{\"value\":\"FOO\"}");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user