Replace TestRestTemplate with RestTestClient in integration tests

Before deprecating `TestRestTemplate`, we must first stop using it in
integration tests and replace it with:
* `RestTestClient` when the Spring MVC infrastructure is present
* `RestClient` when the test does not have Spring MVC on classpath

See gh-46632
This commit is contained in:
Brian Clozel
2026-07-27 16:11:46 +02:00
parent c7ab67a5c0
commit 4daf90ada1
2 changed files with 2 additions and 0 deletions
@@ -49,6 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@AutoConfigureWebTestClient
@AutoConfigureTestRestTemplate
@SuppressWarnings("removal")
abstract class AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests {
@LocalServerPort
@@ -50,6 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@AutoConfigureRestTestClient
@AutoConfigureTestRestTemplate
@SuppressWarnings("removal")
abstract class AbstractSpringBootTestWebServerWebEnvironmentTests {
@LocalServerPort