Improve Object return type support in WebFlux
Issue: SPR-15731
This commit is contained in:
@@ -137,6 +137,12 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
||||
assertEquals(expected, performGet("/person-response/mono", JSON, Person.class).getBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void personResponseBodyWithMonoDeclaredAsObject() throws Exception {
|
||||
Person expected = new Person("Robert");
|
||||
assertEquals(expected, performGet("/person-response/mono-declared-as-object", JSON, Person.class).getBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void personResponseBodyWithSingle() throws Exception {
|
||||
Person expected = new Person("Robert");
|
||||
@@ -442,6 +448,11 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq
|
||||
return Mono.just(new Person("Robert"));
|
||||
}
|
||||
|
||||
@GetMapping("/mono-declared-as-object")
|
||||
public Object getMonoDeclaredAsObject() {
|
||||
return Mono.just(new Person("Robert"));
|
||||
}
|
||||
|
||||
@GetMapping("/single")
|
||||
public Single<Person> getSingle() {
|
||||
return Single.just(new Person("Robert"));
|
||||
|
||||
Reference in New Issue
Block a user