RSocketOutbound refinements; resolve deprecations

* Use properly `cache()` for the `Mono` in the `ClientRSocketConnector`
* Don't require a `publisherElementTypeExpression` in the
`RSocketOutboundGateway`: the target element type is determined
automatically in the `DefaultRequestSpec.toResponseSpec()`
* SF has deprecated `MediaType.APPLICATION_JSON_UTF8`: fix all its usage
in favor of recommendations to use the `MediaType.APPLICATION_JSON` instead
* Also fix plain `application/json;charset=UTF-8` literals to use
`MediaType.APPLICATION_JSON` instead
This commit is contained in:
Artem Bilan
2019-05-01 17:58:06 -04:00
parent 6d7bc1fc39
commit e2b661845e
6 changed files with 65 additions and 11 deletions

View File

@@ -76,7 +76,7 @@ public class WebFluxInboundEndpointTests {
@Test
public void testJsonResult() {
this.webTestClient.get().uri("/persons")
.accept(MediaType.APPLICATION_JSON_UTF8)
.accept(MediaType.APPLICATION_JSON)
.exchange()
.expectStatus().isOk()
.expectBody()

View File

@@ -53,10 +53,10 @@ public class IntegrationGraphControllerTests {
.build();
webTestClient.get().uri("/testIntegration")
.accept(MediaType.APPLICATION_JSON_UTF8)
.accept(MediaType.APPLICATION_JSON)
.exchange()
.expectStatus().isOk()
.expectHeader().contentType(MediaType.APPLICATION_JSON_UTF8)
.expectHeader().contentType(MediaType.APPLICATION_JSON)
.expectBody()
.jsonPath("$.nodes..name").isArray()
.jsonPath("$.contentDescriptor.name").isEqualTo("testApplication")