JAVA-4312: Update deprecations in spring-5-reactive module
This commit is contained in:
+2
-4
@@ -1,17 +1,15 @@
|
||||
package com.baeldung.functional;
|
||||
|
||||
import static org.springframework.web.reactive.function.BodyInserters.fromObject;
|
||||
import static org.springframework.web.reactive.function.BodyInserters.fromValue;
|
||||
import static org.springframework.web.reactive.function.BodyInserters.fromResource;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.web.server.WebServer;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.test.context.support.WithMockUser;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
@@ -115,7 +113,7 @@ public class FunctionalWebApplicationIntegrationTest {
|
||||
|
||||
client.post()
|
||||
.uri("/actor")
|
||||
.body(fromObject(new Actor("Clint", "Eastwood")))
|
||||
.body(fromValue(new Actor("Clint", "Eastwood")))
|
||||
.exchange()
|
||||
.expectStatus()
|
||||
.isOk();
|
||||
|
||||
+2
-2
@@ -133,7 +133,7 @@ public class ErrorHandlingIntegrationTest {
|
||||
.expectStatus()
|
||||
.isBadRequest()
|
||||
.expectHeader()
|
||||
.contentType(MediaType.APPLICATION_JSON_UTF8)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.expectBody()
|
||||
.jsonPath("$.message")
|
||||
.isNotEmpty()
|
||||
@@ -164,7 +164,7 @@ public class ErrorHandlingIntegrationTest {
|
||||
.expectStatus()
|
||||
.isBadRequest()
|
||||
.expectHeader()
|
||||
.contentType(MediaType.APPLICATION_JSON_UTF8)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.expectBody()
|
||||
.jsonPath("$.message")
|
||||
.isNotEmpty()
|
||||
|
||||
Reference in New Issue
Block a user