Browse Source

Fix webflux and webmvc test

Rob Winch 1 month ago
parent
commit
46e48b826a
42 changed files with 61 additions and 40 deletions
  1. 2 1
      reactive/webflux-fn/hello-security/build.gradle
  2. 1 1
      reactive/webflux-fn/hello-security/src/test/java/example/HelloTests.java
  3. 2 1
      reactive/webflux-fn/hello/build.gradle
  4. 1 1
      reactive/webflux-fn/hello/src/test/java/example/HelloTests.java
  5. 1 0
      reactive/webflux/java/authentication/one-time-token/magic-link/build.gradle
  6. 2 1
      reactive/webflux/java/authentication/username-password/form/build.gradle
  7. 2 1
      reactive/webflux/java/authentication/x509/build.gradle
  8. 2 1
      reactive/webflux/java/hello-security-explicit/build.gradle
  9. 1 1
      reactive/webflux/java/hello-security-explicit/src/test/java/example/HelloSecurityTests.java
  10. 2 1
      reactive/webflux/java/hello-security/build.gradle
  11. 1 1
      reactive/webflux/java/hello-security/src/test/java/example/HelloSecurityTests.java
  12. 2 1
      reactive/webflux/java/hello/build.gradle
  13. 1 1
      reactive/webflux/java/hello/src/test/java/example/HelloTests.java
  14. 2 1
      reactive/webflux/java/method/build.gradle
  15. 1 1
      reactive/webflux/java/method/src/test/java/example/HelloMethodApplicationTests.java
  16. 2 1
      reactive/webflux/java/oauth2/login/build.gradle
  17. 1 1
      reactive/webflux/java/oauth2/login/src/test/java/example/OAuth2LoginControllerTests.java
  18. 2 1
      reactive/webflux/java/oauth2/resource-server/build.gradle
  19. 1 1
      reactive/webflux/java/oauth2/resource-server/src/test/java/example/OAuth2ResourceServerControllerTests.java
  20. 2 1
      reactive/webflux/java/oauth2/webclient/build.gradle
  21. 2 2
      reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java
  22. 1 1
      reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientWebFluxApplicationTests.java
  23. 2 2
      reactive/webflux/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java
  24. 1 0
      reactive/webflux/java/session-management/maximum-sessions/build.gradle
  25. 1 1
      reactive/webflux/java/session-management/maximum-sessions/src/test/java/com/example/maximumsessions/MaximumSessionsApplicationPreventLoginTests.java
  26. 1 1
      reactive/webflux/java/session-management/maximum-sessions/src/test/java/com/example/maximumsessions/MaximumSessionsApplicationTests.java
  27. 1 0
      reactive/webflux/kotlin/hello-security/build.gradle.kts
  28. 1 1
      servlet/spring-boot/java/cas/login/src/test/java/cas/example/CasLoginApplicationTests.java
  29. 2 1
      servlet/spring-boot/java/hello-security-explicit/build.gradle
  30. 1 1
      servlet/spring-boot/java/hello-security-explicit/src/test/java/example/HelloSecurityExplicitApplicationTests.java
  31. 2 1
      servlet/spring-boot/java/hello-security/build.gradle
  32. 1 1
      servlet/spring-boot/java/hello-security/src/test/java/example/HelloSecurityApplicationTests.java
  33. 2 1
      servlet/spring-boot/java/hello/build.gradle
  34. 1 1
      servlet/spring-boot/java/hello/src/test/java/example/HelloApplicationTests.java
  35. 2 1
      servlet/spring-boot/java/jwt/login/build.gradle
  36. 1 1
      servlet/spring-boot/java/jwt/login/src/test/java/example/web/HelloControllerTests.java
  37. 2 1
      servlet/spring-boot/java/ldap/build.gradle
  38. 1 1
      servlet/spring-boot/java/ldap/src/test/java/example/web/HelloControllerTests.java
  39. 2 1
      servlet/spring-boot/java/observability/build.gradle
  40. 1 1
      servlet/spring-boot/java/observability/src/test/java/example/HelloObservabilityApplicationTests.java
  41. 1 0
      servlet/spring-boot/kotlin/hello-security/build.gradle.kts
  42. 1 1
      servlet/spring-boot/kotlin/hello-security/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt

+ 2 - 1
reactive/webflux-fn/hello-security/build.gradle

@@ -18,10 +18,11 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux-fn/hello-security/src/test/java/example/HelloTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 

+ 2 - 1
reactive/webflux-fn/hello/build.gradle

@@ -17,9 +17,10 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux-fn/hello/src/test/java/example/HelloTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 
 /**
 /**

+ 1 - 0
reactive/webflux/java/authentication/one-time-token/magic-link/build.gradle

@@ -23,6 +23,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-mail'
 	implementation 'org.springframework.boot:spring-boot-starter-mail'
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'com.icegreen:greenmail-junit5:2.0.1'
 	testImplementation 'com.icegreen:greenmail-junit5:2.0.1'
 	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
 	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

+ 2 - 1
reactive/webflux/java/authentication/username-password/form/build.gradle

@@ -19,6 +19,7 @@ dependencies {
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 
 
 	integTestImplementation "org.seleniumhq.selenium:htmlunit-driver:4.13.0"
 	integTestImplementation "org.seleniumhq.selenium:htmlunit-driver:4.13.0"
@@ -27,5 +28,5 @@ dependencies {
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 2 - 1
reactive/webflux/java/authentication/x509/build.gradle

@@ -17,11 +17,12 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 2 - 1
reactive/webflux/java/hello-security-explicit/build.gradle

@@ -18,6 +18,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 
 
 	integTestImplementation "org.seleniumhq.selenium:htmlunit-driver:4.13.0"
 	integTestImplementation "org.seleniumhq.selenium:htmlunit-driver:4.13.0"
@@ -25,5 +26,5 @@ dependencies {
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux/java/hello-security-explicit/src/test/java/example/HelloSecurityTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 

+ 2 - 1
reactive/webflux/java/hello-security/build.gradle

@@ -18,10 +18,11 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux/java/hello-security/src/test/java/example/HelloSecurityTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 

+ 2 - 1
reactive/webflux/java/hello/build.gradle

@@ -17,9 +17,10 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux/java/hello/src/test/java/example/HelloTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 
 /**
 /**

+ 2 - 1
reactive/webflux/java/method/build.gradle

@@ -19,10 +19,11 @@ dependencies {
 
 
 	testImplementation 'io.projectreactor:reactor-test'
 	testImplementation 'io.projectreactor:reactor-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux/java/method/src/test/java/example/HelloMethodApplicationTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 

+ 2 - 1
reactive/webflux/java/oauth2/login/build.gradle

@@ -19,6 +19,7 @@ dependencies {
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 
 
 	integTestImplementation 'org.htmlunit:htmlunit'
 	integTestImplementation 'org.htmlunit:htmlunit'
@@ -26,5 +27,5 @@ dependencies {
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux/java/oauth2/login/src/test/java/example/OAuth2LoginControllerTests.java

@@ -23,7 +23,7 @@ import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 import org.mockito.junit.jupiter.MockitoExtension;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
+import org.springframework.boot.webflux.test.autoconfigure.WebFluxTest;
 import org.springframework.core.ReactiveAdapterRegistry;
 import org.springframework.core.ReactiveAdapterRegistry;
 import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository;
 import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository;
 import org.springframework.security.oauth2.client.web.reactive.result.method.annotation.OAuth2AuthorizedClientArgumentResolver;
 import org.springframework.security.oauth2.client.web.reactive.result.method.annotation.OAuth2AuthorizedClientArgumentResolver;

+ 2 - 1
reactive/webflux/java/oauth2/resource-server/build.gradle

@@ -18,10 +18,11 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
reactive/webflux/java/oauth2/resource-server/src/test/java/example/OAuth2ResourceServerControllerTests.java

@@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test;
 import reactor.core.publisher.Mono;
 import reactor.core.publisher.Mono;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
 import org.springframework.boot.test.context.TestConfiguration;
 import org.springframework.boot.test.context.TestConfiguration;
+import org.springframework.boot.webflux.test.autoconfigure.WebFluxTest;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Import;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;

+ 2 - 1
reactive/webflux/java/oauth2/webclient/build.gradle

@@ -20,11 +20,12 @@ dependencies {
 	implementation 'io.projectreactor.netty:reactor-netty'
 	implementation 'io.projectreactor.netty:reactor-netty'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'com.squareup.okhttp3:mockwebserver:5.1.0'
 	testImplementation 'com.squareup.okhttp3:mockwebserver:5.1.0'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 2 - 2
reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java

@@ -22,8 +22,8 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
-import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
+import org.springframework.boot.webflux.test.autoconfigure.WebFluxTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Import;

+ 1 - 1
reactive/webflux/java/oauth2/webclient/src/test/java/example/OAuth2WebClientWebFluxApplicationTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
 
 /**
 /**

+ 2 - 2
reactive/webflux/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java

@@ -22,8 +22,8 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
-import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
+import org.springframework.boot.webflux.test.autoconfigure.WebFluxTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Import;

+ 1 - 0
reactive/webflux/java/session-management/maximum-sessions/build.gradle

@@ -21,6 +21,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-security'
 	implementation 'org.springframework.boot:spring-boot-starter-security'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	implementation 'org.springframework.boot:spring-boot-starter-webflux'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webflux-test'
 	testImplementation 'io.projectreactor:reactor-test'
 	testImplementation 'io.projectreactor:reactor-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }

+ 1 - 1
reactive/webflux/java/session-management/maximum-sessions/src/test/java/com/example/maximumsessions/MaximumSessionsApplicationPreventLoginTests.java

@@ -19,8 +19,8 @@ package com.example.maximumsessions;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.http.MediaType;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseCookie;
 import org.springframework.http.ResponseCookie;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.TestPropertySource;

+ 1 - 1
reactive/webflux/java/session-management/maximum-sessions/src/test/java/com/example/maximumsessions/MaximumSessionsApplicationTests.java

@@ -19,8 +19,8 @@ package com.example.maximumsessions;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.reactive.AutoConfigureWebTestClient;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
 import org.springframework.http.MediaType;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseCookie;
 import org.springframework.http.ResponseCookie;
 import org.springframework.test.web.reactive.server.WebTestClient;
 import org.springframework.test.web.reactive.server.WebTestClient;

+ 1 - 0
reactive/webflux/kotlin/hello-security/build.gradle.kts

@@ -30,6 +30,7 @@ dependencies {
     testImplementation("org.springframework.boot:spring-boot-starter-test") {
     testImplementation("org.springframework.boot:spring-boot-starter-test") {
         exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
         exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
     }
     }
+    testImplementation("org.springframework.boot:spring-boot-webflux-test")
     testImplementation("io.projectreactor:reactor-test")
     testImplementation("io.projectreactor:reactor-test")
 }
 }
 
 

+ 1 - 1
servlet/spring-boot/java/cas/login/src/test/java/cas/example/CasLoginApplicationTests.java

@@ -31,7 +31,7 @@ import org.testcontainers.utility.DockerImageName;
 
 
 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.web.server.test.LocalServerPort;
+import org.springframework.boot.test.web.server.LocalServerPort;
 import org.springframework.core.env.Environment;
 import org.springframework.core.env.Environment;
 import org.springframework.test.context.DynamicPropertyRegistry;
 import org.springframework.test.context.DynamicPropertyRegistry;
 import org.springframework.test.context.DynamicPropertySource;
 import org.springframework.test.context.DynamicPropertySource;

+ 2 - 1
servlet/spring-boot/java/hello-security-explicit/build.gradle

@@ -18,6 +18,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 
 
 	integTestImplementation "org.seleniumhq.selenium:htmlunit-driver:4.13.0"
 	integTestImplementation "org.seleniumhq.selenium:htmlunit-driver:4.13.0"
@@ -25,5 +26,5 @@ dependencies {
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
servlet/spring-boot/java/hello-security-explicit/src/test/java/example/HelloSecurityExplicitApplicationTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.servlet.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 
 

+ 2 - 1
servlet/spring-boot/java/hello-security/build.gradle

@@ -18,10 +18,11 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
servlet/spring-boot/java/hello-security/src/test/java/example/HelloSecurityApplicationTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.servlet.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 
 

+ 2 - 1
servlet/spring-boot/java/hello/build.gradle

@@ -17,9 +17,10 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
servlet/spring-boot/java/hello/src/test/java/example/HelloApplicationTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.servlet.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 
 
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;

+ 2 - 1
servlet/spring-boot/java/jwt/login/build.gradle

@@ -16,10 +16,11 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
servlet/spring-boot/java/jwt/login/src/test/java/example/web/HelloControllerTests.java

@@ -20,7 +20,7 @@ import example.RestConfig;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.servlet.WebMvcTest;
+import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Import;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MvcResult;
 import org.springframework.test.web.servlet.MvcResult;

+ 2 - 1
servlet/spring-boot/java/ldap/build.gradle

@@ -18,10 +18,11 @@ dependencies {
 	implementation 'com.unboundid:unboundid-ldapsdk:6.0.10'
 	implementation 'com.unboundid:unboundid-ldapsdk:6.0.10'
 
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
servlet/spring-boot/java/ldap/src/test/java/example/web/HelloControllerTests.java

@@ -20,7 +20,7 @@ import example.SecurityConfig;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.servlet.WebMvcTest;
+import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Import;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 
 

+ 2 - 1
servlet/spring-boot/java/observability/build.gradle

@@ -21,10 +21,11 @@ dependencies {
 
 
     testImplementation 'org.springframework.boot:spring-boot-starter-restclient'
     testImplementation 'org.springframework.boot:spring-boot-starter-restclient'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 }
 
 
 tasks.withType(Test).configureEach {
 tasks.withType(Test).configureEach {
 	useJUnitPlatform()
 	useJUnitPlatform()
-	
+
 }
 }

+ 1 - 1
servlet/spring-boot/java/observability/src/test/java/example/HelloObservabilityApplicationTests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 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.autoconfigure.web.servlet.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.security.test.context.support.WithAnonymousUser;
 import org.springframework.security.test.context.support.WithAnonymousUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MockMvc;

+ 1 - 0
servlet/spring-boot/kotlin/hello-security/build.gradle.kts

@@ -26,6 +26,7 @@ dependencies {
     implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
     implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
     implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
     implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
     testImplementation("org.springframework.boot:spring-boot-starter-test")
     testImplementation("org.springframework.boot:spring-boot-starter-test")
+    testImplementation("org.springframework.boot:spring-boot-webmvc-test")
     testImplementation("org.springframework.security:spring-security-test")
     testImplementation("org.springframework.security:spring-security-test")
 }
 }
 
 

+ 1 - 1
servlet/spring-boot/kotlin/hello-security/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt

@@ -18,8 +18,8 @@ package org.springframework.security.samples
 
 
 import org.junit.jupiter.api.Test
 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.autoconfigure.web.servlet.AutoConfigureMockMvc
 import org.springframework.boot.test.context.SpringBootTest
 import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc
 import org.springframework.mock.web.MockHttpSession
 import org.springframework.mock.web.MockHttpSession
 import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestBuilders.formLogin
 import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestBuilders.formLogin
 import org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.authenticated
 import org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.authenticated