Browse Source

Add @AutoConfigureWebTestClient

Rob Winch 1 month ago
parent
commit
ecdc6c47b3

+ 2 - 0
reactive/webflux/java/method/src/integTest/java/example/HelloMethodApplicationITests.java

@@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpHeaders;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 
@@ -32,6 +33,7 @@ import org.springframework.test.web.reactive.server.WebTestClient;
  * @since 5.0
  * @since 5.0
  */
  */
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@AutoConfigureWebTestClient
 public class HelloMethodApplicationITests {
 public class HelloMethodApplicationITests {
 
 
 	@Autowired
 	@Autowired