Browse Source

AutoConfigureMockMvc

Rob Winch 1 month ago
parent
commit
54f49df028
44 changed files with 44 additions and 26 deletions
  1. 1 0
      servlet/spring-boot/java/authentication/mfa/formLogin+ott/build.gradle
  2. 1 1
      servlet/spring-boot/java/authentication/mfa/formLogin+ott/src/test/java/example/CustomPagesConfigTests.java
  3. 1 1
      servlet/spring-boot/java/authentication/mfa/formLogin+ott/src/test/java/example/DefaultConfigTests.java
  4. 1 1
      servlet/spring-boot/java/authentication/mfa/formLogin+ott/src/test/java/example/ElevatedSecurityPageConfigTests.java
  5. 1 0
      servlet/spring-boot/java/authentication/mfa/oauth2/build.gradle
  6. 1 1
      servlet/spring-boot/java/authentication/mfa/oauth2/src/test/java/example/FormLoginOAuth2ApplicationTests.java
  7. 1 0
      servlet/spring-boot/java/authentication/mfa/x509+formLogin/build.gradle
  8. 1 1
      servlet/spring-boot/java/authentication/mfa/x509+formLogin/src/test/java/example/MfaApplicationTests.java
  9. 1 0
      servlet/spring-boot/java/authentication/mfa/x509+webauthn/build.gradle
  10. 1 1
      servlet/spring-boot/java/authentication/mfa/x509+webauthn/src/test/java/example/X509WebAuthnMfaApplicationTests.java
  11. 1 0
      servlet/spring-boot/java/authentication/one-time-token/magic-link/build.gradle
  12. 1 1
      servlet/spring-boot/java/authentication/one-time-token/magic-link/src/test/java/org/example/magiclink/MagicLinkApplicationTests.java
  13. 1 0
      servlet/spring-boot/java/authentication/username-password/mfa/build.gradle
  14. 1 1
      servlet/spring-boot/java/authentication/username-password/mfa/src/test/java/example/MfaApplicationTests.java
  15. 1 0
      servlet/spring-boot/java/authentication/username-password/user-details-service/custom-user/build.gradle
  16. 1 1
      servlet/spring-boot/java/authentication/username-password/user-details-service/custom-user/src/test/java/example/UserDetailsServiceApplicationTests.java
  17. 1 0
      servlet/spring-boot/java/oauth2/authorization-server/build.gradle
  18. 1 1
      servlet/spring-boot/java/oauth2/authorization-server/src/integTest/java/example/OAuth2AuthorizationServerApplicationITests.java
  19. 1 1
      servlet/spring-boot/java/oauth2/login/src/integTest/java/example/OAuth2LoginApplicationTests.java
  20. 1 1
      servlet/spring-boot/java/oauth2/resource-server/hello-security/src/integTest/java/example/OAuth2ResourceServerApplicationITests.java
  21. 1 0
      servlet/spring-boot/java/oauth2/resource-server/jwe/build.gradle
  22. 1 1
      servlet/spring-boot/java/oauth2/resource-server/jwe/src/integTest/java/example/OAuth2JweResourceServerApplicationITests.java
  23. 1 0
      servlet/spring-boot/java/oauth2/resource-server/multi-tenancy/build.gradle
  24. 1 1
      servlet/spring-boot/java/oauth2/resource-server/multi-tenancy/src/integTest/java/example/OAuth2MultitenancyResourceServerApplicationITests.java
  25. 1 1
      servlet/spring-boot/java/oauth2/resource-server/opaque/src/integTest/java/example/OAuth2OpaqueTokenResourceServerApplicationITests.java
  26. 1 0
      servlet/spring-boot/java/oauth2/resource-server/static/build.gradle
  27. 1 1
      servlet/spring-boot/java/oauth2/resource-server/static/src/integTest/java/example/OAuth2StaticResourceServerApplicationITests.java
  28. 1 0
      servlet/spring-boot/java/oauth2/restclient/build.gradle
  29. 1 1
      servlet/spring-boot/java/oauth2/restclient/src/integTest/java/example/OAuth2RestClientApplicationITests.java
  30. 1 1
      servlet/spring-boot/java/oauth2/webclient/src/test/java/example/OAuth2WebClientApplicationTests.java
  31. 1 1
      servlet/spring-boot/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java
  32. 1 1
      servlet/spring-boot/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java
  33. 1 0
      servlet/spring-boot/java/saml2/login/build.gradle
  34. 1 1
      servlet/spring-boot/java/saml2/login/src/integTest/java/example/Saml2LoginApplicationITests.java
  35. 1 0
      servlet/spring-boot/java/saml2/refreshable-metadata/build.gradle
  36. 1 1
      servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/Saml2LoginApplicationITests.java
  37. 1 0
      servlet/spring-boot/java/saml2/saml-extension-federation/build.gradle
  38. 1 1
      servlet/spring-boot/java/saml2/saml-extension-federation/src/integTest/java/example/SamlExtensionFederationApplicationITests.java
  39. 1 0
      servlet/spring-boot/java/saml2/saml-extension-urls/build.gradle
  40. 1 1
      servlet/spring-boot/java/saml2/saml-extension-urls/src/integTest/java/example/SamlExtensionUrlsApplicationITests.java
  41. 1 0
      servlet/spring-boot/java/session-management/maximum-sessions-prevent-login/build.gradle
  42. 1 1
      servlet/spring-boot/java/session-management/maximum-sessions-prevent-login/src/integTest/java/com/example/maximumsessionspreventlogin/MaximumSessionsPreventLoginTests.java
  43. 1 0
      servlet/spring-boot/java/session-management/maximum-sessions/build.gradle
  44. 1 1
      servlet/spring-boot/java/session-management/maximum-sessions/src/integTest/java/com/example/maximumsessions/MaximumSessionsTests.java

+ 1 - 0
servlet/spring-boot/java/authentication/mfa/formLogin+ott/build.gradle

@@ -22,6 +22,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
 }

+ 1 - 1
servlet/spring-boot/java/authentication/mfa/formLogin+ott/src/test/java/example/CustomPagesConfigTests.java

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

+ 1 - 1
servlet/spring-boot/java/authentication/mfa/formLogin+ott/src/test/java/example/DefaultConfigTests.java

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

+ 1 - 1
servlet/spring-boot/java/authentication/mfa/formLogin+ott/src/test/java/example/ElevatedSecurityPageConfigTests.java

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

+ 1 - 0
servlet/spring-boot/java/authentication/mfa/oauth2/build.gradle

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

+ 1 - 1
servlet/spring-boot/java/authentication/mfa/oauth2/src/test/java/example/FormLoginOAuth2ApplicationTests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.security.test.context.support.WithMockUser;
 import org.springframework.test.web.servlet.MockMvc;

+ 1 - 0
servlet/spring-boot/java/authentication/mfa/x509+formLogin/build.gradle

@@ -21,6 +21,7 @@ dependencies {
 	implementation 'com.j256.two-factor-auth:two-factor-auth:1.3'
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/authentication/mfa/x509+formLogin/src/test/java/example/MfaApplicationTests.java

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

+ 1 - 0
servlet/spring-boot/java/authentication/mfa/x509+webauthn/build.gradle

@@ -22,6 +22,7 @@ dependencies {
 	implementation "com.webauthn4j:webauthn4j-core:0.29.4.RELEASE"
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/authentication/mfa/x509+webauthn/src/test/java/example/X509WebAuthnMfaApplicationTests.java

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

+ 1 - 0
servlet/spring-boot/java/authentication/one-time-token/magic-link/build.gradle

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

+ 1 - 1
servlet/spring-boot/java/authentication/one-time-token/magic-link/src/test/java/org/example/magiclink/MagicLinkApplicationTests.java

@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
 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.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.web.util.UriComponents;
 import org.springframework.web.util.UriComponentsBuilder;

+ 1 - 0
servlet/spring-boot/java/authentication/username-password/mfa/build.gradle

@@ -21,6 +21,7 @@ dependencies {
 	implementation 'com.j256.two-factor-auth:two-factor-auth:1.3'
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/authentication/username-password/mfa/src/test/java/example/MfaApplicationTests.java

@@ -22,7 +22,7 @@ import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.mock.web.MockHttpSession;
 import org.springframework.test.web.servlet.MockMvc;

+ 1 - 0
servlet/spring-boot/java/authentication/username-password/user-details-service/custom-user/build.gradle

@@ -18,6 +18,7 @@ dependencies {
 
     testImplementation 'org.springframework.boot:spring-boot-starter-restclient'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/authentication/username-password/user-details-service/custom-user/src/test/java/example/UserDetailsServiceApplicationTests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.security.test.context.support.WithUserDetails;
 import org.springframework.test.web.servlet.MockMvc;

+ 1 - 0
servlet/spring-boot/java/oauth2/authorization-server/build.gradle

@@ -18,6 +18,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-oauth2-authorization-server'
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 
 	integTestImplementation 'org.htmlunit:htmlunit'

+ 1 - 1
servlet/spring-boot/java/oauth2/authorization-server/src/integTest/java/example/OAuth2AuthorizationServerApplicationITests.java

@@ -23,8 +23,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import org.junit.jupiter.api.Test;
 
 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.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MvcResult;

+ 1 - 1
servlet/spring-boot/java/oauth2/login/src/integTest/java/example/OAuth2LoginApplicationTests.java

@@ -39,7 +39,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;

+ 1 - 1
servlet/spring-boot/java/oauth2/resource-server/hello-security/src/integTest/java/example/OAuth2ResourceServerApplicationITests.java

@@ -19,8 +19,8 @@ package example;
 import org.junit.jupiter.api.Test;
 
 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.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.http.HttpHeaders;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.test.context.ActiveProfiles;

+ 1 - 0
servlet/spring-boot/java/oauth2/resource-server/jwe/build.gradle

@@ -34,6 +34,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/oauth2/resource-server/jwe/src/integTest/java/example/OAuth2JweResourceServerApplicationITests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.http.HttpHeaders;
 import org.springframework.mock.web.MockHttpServletRequest;

+ 1 - 0
servlet/spring-boot/java/oauth2/resource-server/multi-tenancy/build.gradle

@@ -35,6 +35,7 @@ dependencies {
 	implementation 'com.nimbusds:oauth2-oidc-sdk:9.43.4'
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/oauth2/resource-server/multi-tenancy/src/integTest/java/example/OAuth2MultitenancyResourceServerApplicationITests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.http.HttpHeaders;
 import org.springframework.mock.web.MockHttpServletRequest;

+ 1 - 1
servlet/spring-boot/java/oauth2/resource-server/opaque/src/integTest/java/example/OAuth2OpaqueTokenResourceServerApplicationITests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.http.HttpHeaders;
 import org.springframework.mock.web.MockHttpServletRequest;

+ 1 - 0
servlet/spring-boot/java/oauth2/resource-server/static/build.gradle

@@ -33,6 +33,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/oauth2/resource-server/static/src/integTest/java/example/OAuth2StaticResourceServerApplicationITests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.http.HttpHeaders;
 import org.springframework.mock.web.MockHttpServletRequest;

+ 1 - 0
servlet/spring-boot/java/oauth2/restclient/build.gradle

@@ -19,6 +19,7 @@ dependencies {
 
     testImplementation 'org.springframework.boot:spring-boot-starter-restclient'
     testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	testImplementation 'com.squareup.okhttp3:mockwebserver:5.1.0'
 }

+ 1 - 1
servlet/spring-boot/java/oauth2/restclient/src/integTest/java/example/OAuth2RestClientApplicationITests.java

@@ -27,7 +27,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.http.HttpHeaders;
 import org.springframework.security.oauth2.core.OAuth2AccessToken;

+ 1 - 1
servlet/spring-boot/java/oauth2/webclient/src/test/java/example/OAuth2WebClientApplicationTests.java

@@ -19,7 +19,7 @@ package example;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.web.servlet.MockMvc;
 

+ 1 - 1
servlet/spring-boot/java/oauth2/webclient/src/test/java/example/OAuth2WebClientControllerTests.java

@@ -22,7 +22,7 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;

+ 1 - 1
servlet/spring-boot/java/oauth2/webclient/src/test/java/example/RegisteredOAuth2AuthorizedClientControllerTests.java

@@ -22,7 +22,7 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;

+ 1 - 0
servlet/spring-boot/java/saml2/login/build.gradle

@@ -29,6 +29,7 @@ dependencies {
 	testImplementation project(":servlet:spring-boot:java:saml2:identity-provider")
 	testImplementation 'org.htmlunit:htmlunit'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	runtimeOnly "org.springframework.boot:spring-boot-docker-compose"
 }

+ 1 - 1
servlet/spring-boot/java/saml2/login/src/integTest/java/example/Saml2LoginApplicationITests.java

@@ -31,7 +31,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.web.server.test.LocalServerPort;
 

+ 1 - 0
servlet/spring-boot/java/saml2/refreshable-metadata/build.gradle

@@ -29,6 +29,7 @@ dependencies {
 	testImplementation project(':servlet:spring-boot:java:saml2:identity-provider')
 	testImplementation 'org.htmlunit:htmlunit'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	runtimeOnly "org.springframework.boot:spring-boot-docker-compose"
 }

+ 1 - 1
servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/Saml2LoginApplicationITests.java

@@ -31,7 +31,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.web.server.test.LocalServerPort;
 

+ 1 - 0
servlet/spring-boot/java/saml2/saml-extension-federation/build.gradle

@@ -29,6 +29,7 @@ dependencies {
 	testImplementation project(':servlet:spring-boot:java:saml2:identity-provider')
 	testImplementation 'org.htmlunit:htmlunit'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	runtimeOnly "org.springframework.boot:spring-boot-docker-compose"
 }

+ 1 - 1
servlet/spring-boot/java/saml2/saml-extension-federation/src/integTest/java/example/SamlExtensionFederationApplicationITests.java

@@ -31,7 +31,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.web.server.test.LocalServerPort;
 

+ 1 - 0
servlet/spring-boot/java/saml2/saml-extension-urls/build.gradle

@@ -29,6 +29,7 @@ dependencies {
 	testImplementation project(':servlet:spring-boot:java:saml2:identity-provider')
 	testImplementation 'org.htmlunit:htmlunit'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 	runtimeOnly "org.springframework.boot:spring-boot-docker-compose"
 }

+ 1 - 1
servlet/spring-boot/java/saml2/saml-extension-urls/src/integTest/java/example/SamlExtensionUrlsApplicationITests.java

@@ -31,7 +31,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.web.server.test.LocalServerPort;
 import org.springframework.test.web.servlet.MockMvc;

+ 1 - 0
servlet/spring-boot/java/session-management/maximum-sessions-prevent-login/build.gradle

@@ -15,6 +15,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-security'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/session-management/maximum-sessions-prevent-login/src/integTest/java/com/example/maximumsessionspreventlogin/MaximumSessionsPreventLoginTests.java

@@ -19,7 +19,7 @@ package com.example.maximumsessionspreventlogin;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.context.annotation.Import;
 import org.springframework.mock.web.MockHttpSession;

+ 1 - 0
servlet/spring-boot/java/session-management/maximum-sessions/build.gradle

@@ -15,6 +15,7 @@ dependencies {
 	implementation 'org.springframework.boot:spring-boot-starter-security'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
 	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+	testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
 	testImplementation 'org.springframework.security:spring-security-test'
 }
 

+ 1 - 1
servlet/spring-boot/java/session-management/maximum-sessions/src/integTest/java/com/example/maximumsessions/MaximumSessionsTests.java

@@ -19,7 +19,7 @@ package com.example.maximumsessions;
 import org.junit.jupiter.api.Test;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.mock.web.MockHttpSession;
 import org.springframework.test.web.servlet.MockMvc;