Rename ServerResponse.BodyBuilder.body to syncBody

This commit renames the `body(Object)` on ServerResponse to
`syncBody(Object)`. The reason for this is that the original method
name clashed with the `body(Publisher)` method in the Kotlin extension.

The new name nicely reflects the synchronous nature of the method,
 making it less appealing than the `Publisher`-based `body` method.

Issue: SPR-15467
This commit is contained in:
Arjen Poutsma
2017-04-24 17:15:33 +02:00
parent 6a1ce13ae2
commit b9dbac7b2c
12 changed files with 22 additions and 25 deletions

View File

@@ -19,7 +19,6 @@ import java.net.URI;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -64,7 +63,7 @@ public class JsonContentTests {
public void postJsonContent() throws Exception {
this.client.post().uri("/persons")
.contentType(MediaType.APPLICATION_JSON_UTF8)
.body("{\"name\":\"John\"}")
.syncBody("{\"name\":\"John\"}")
.exchange()
.expectStatus().isCreated()
.expectBody().isEmpty();

View File

@@ -123,7 +123,7 @@ public class ResponseEntityTests {
@Test
public void postEntity() throws Exception {
this.client.post().uri("/persons")
.body(new Person("John"))
.syncBody(new Person("John"))
.exchange()
.expectStatus().isCreated()
.expectHeader().valueEquals("location", "/persons/John")