Browse Source

Merge branch '3.3.x'

Closes gh-41858
pull/41876/head
Moritz Halbritter 2 years ago
parent
commit
46150bae89
  1. 2
      buildSrc/gradle.properties
  2. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java
  3. 1
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinRestTemplateSender.java
  4. 1
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSender.java
  5. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/opentelemetry/otlp/OtlpLoggingAutoConfigurationIntegrationTests.java
  6. 4
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java
  7. 1
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
  8. 1
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqExceptionTranslatorTests.java
  9. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/dockerTest/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTestDockerTests.java
  10. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/Definition.java
  11. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/DefinitionsParser.java
  12. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockDefinition.java
  13. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizer.java
  14. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactory.java
  15. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/QualifierDefinition.java
  16. 1
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java
  17. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/AbstractMockBeanOnGenericExtensionTests.java
  18. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/AbstractMockBeanOnGenericTests.java
  19. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/DefinitionsParserTests.java
  20. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanContextCachingTests.java
  21. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanForBeanFactoryIntegrationTests.java
  22. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationClassForExistingBeanIntegrationTests.java
  23. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationClassForNewBeanIntegrationTests.java
  24. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationFieldForExistingBeanIntegrationTests.java
  25. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationFieldForNewBeanIntegrationTests.java
  26. 33
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnContextHierarchyIntegrationTests.java
  27. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnScopedProxyTests.java
  28. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestClassForExistingBeanIntegrationTests.java
  29. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestClassForNewBeanIntegrationTests.java
  30. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanCacheIntegrationTests.java
  31. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanConfig.java
  32. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanIntegrationTests.java
  33. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanWithQualifierIntegrationTests.java
  34. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForNewBeanIntegrationTests.java
  35. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithAopProxyTests.java
  36. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithAsyncInterfaceMethodIntegrationTests.java
  37. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests.java
  38. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithGenericsOnTestFieldForNewBeanIntegrationTests.java
  39. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithInjectedFieldIntegrationTests.java
  40. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithSpringMethodRuleRepeatJUnit4IntegrationTests.java
  41. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockDefinitionTests.java
  42. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockResetTests.java
  43. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactoryTests.java
  44. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerTests.java
  45. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessorTests.java
  46. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerIntegrationTests.java
  47. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerTests.java
  48. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java
  49. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/ResetMocksTestExecutionListenerTests.java
  50. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolverIntegrationTests.java
  51. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolverTests.java
  52. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationClassForExistingBeanIntegrationTests.java
  53. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationClassForNewBeanIntegrationTests.java
  54. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationFieldForExistingBeanIntegrationTests.java
  55. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationFieldForNewBeanIntegrationTests.java
  56. 34
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnContextHierarchyIntegrationTests.java
  57. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestClassForExistingBeanIntegrationTests.java
  58. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestClassForNewBeanIntegrationTests.java
  59. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests.java
  60. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanConfig.java
  61. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanIntegrationTests.java
  62. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanWithQualifierIntegrationTests.java
  63. 5
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingCircularBeansIntegrationTests.java
  64. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingGenericBeanIntegrationTests.java
  65. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingGenericBeanProducedByFactoryBeanIntegrationTests.java
  66. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForMultipleExistingBeansWithOnePrimaryIntegrationTests.java
  67. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForNewBeanIntegrationTests.java
  68. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithAopProxyAndNotProxyTargetAwareTests.java
  69. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithAopProxyTests.java
  70. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests.java
  71. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithJdkProxyTests.java
  72. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithNameOnTestFieldForMultipleExistingBeansTests.java
  73. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyDefinitionTests.java
  74. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/CustomQualifier.java
  75. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/CustomQualifierExampleService.java
  76. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleExtraInterface.java
  77. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleGenericService.java
  78. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleGenericServiceCaller.java
  79. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleGenericStringServiceCaller.java
  80. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleService.java
  81. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleServiceCaller.java
  82. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/FailingExampleService.java
  83. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/RealExampleService.java
  84. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/SimpleExampleIntegerGenericService.java
  85. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/SimpleExampleService.java
  86. 1
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/SimpleExampleStringGenericService.java
  87. 2
      spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/LoadTimeWeaverAwareConsumerImportTestcontainersTests.java
  88. 2
      spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestContainersParallelStartupIntegrationTests.java
  89. 1
      spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokDeprecatedProperties.java
  90. 1
      spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/method/DeprecatedClassMethodConfig.java
  91. 1
      spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/DeprecatedProperties.java
  92. 2
      spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/zip/VirtualZipPerformanceTests.java
  93. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactories.java
  94. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/json/JsonWriterTests.java
  95. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp3Tests.java
  96. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp4Tests.java
  97. 2
      spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/src/test/java/smoketest/ant/SampleAntApplicationIT.java
  98. 1
      spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/test/java/smoketest/data/jpa/SpyBeanSampleDataJpaApplicationTests.java

2
buildSrc/gradle.properties

@ -1 +1 @@ @@ -1 +1 @@
javaFormatVersion=0.0.41
javaFormatVersion=0.0.43

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java

@ -54,6 +54,7 @@ public class PrometheusProperties { @@ -54,6 +54,7 @@ public class PrometheusProperties {
/**
* Histogram type for backing DistributionSummary and Timer.
* @deprecated since 3.3.0 for removal in 3.5.0
*/
@Deprecated(since = "3.3.0", forRemoval = true)
private HistogramFlavor histogramFlavor = HistogramFlavor.Prometheus;
@ -230,7 +231,7 @@ public class PrometheusProperties { @@ -230,7 +231,7 @@ public class PrometheusProperties {
@Deprecated(since = "3.3.0", forRemoval = true)
public enum HistogramFlavor {
Prometheus, VictoriaMetrics;
Prometheus, VictoriaMetrics
}

1
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinRestTemplateSender.java

@ -31,6 +31,7 @@ import org.springframework.web.client.RestTemplate; @@ -31,6 +31,7 @@ import org.springframework.web.client.RestTemplate;
*
* @author Moritz Halbritter
* @author Stefan Bratanov
* @deprecated since 3.3.0 for removal in 3.5.0 in favor of {@link ZipkinHttpClientSender}
*/
@Deprecated(since = "3.3.0", forRemoval = true)
class ZipkinRestTemplateSender extends HttpSender {

1
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSender.java

@ -30,6 +30,7 @@ import org.springframework.web.reactive.function.client.WebClient; @@ -30,6 +30,7 @@ import org.springframework.web.reactive.function.client.WebClient;
*
* @author Stefan Bratanov
* @author Moritz Halbritter
* @deprecated since 3.3.0 for removal in 3.5.0 in favor of {@link ZipkinHttpClientSender}
*/
@Deprecated(since = "3.3.0", forRemoval = true)
class ZipkinWebClientSender extends HttpSender {

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/opentelemetry/otlp/OtlpLoggingAutoConfigurationIntegrationTests.java

@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Toshiaki Maki
*/
public class OtlpLoggingAutoConfigurationIntegrationTests {
class OtlpLoggingAutoConfigurationIntegrationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.application.name=otlp-logs-test",

4
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java

@ -62,10 +62,10 @@ import org.springframework.web.filter.OncePerRequestFilter; @@ -62,10 +62,10 @@ import org.springframework.web.filter.OncePerRequestFilter;
* @author Andy Wilkinson
* @see JerseyEndpointResourceFactory
*/
public class JerseyWebEndpointIntegrationTests
class JerseyWebEndpointIntegrationTests
extends AbstractWebEndpointIntegrationTests<AnnotationConfigServletWebServerApplicationContext> {
public JerseyWebEndpointIntegrationTests() {
JerseyWebEndpointIntegrationTests() {
super(JerseyWebEndpointIntegrationTests::createApplicationContext,
JerseyWebEndpointIntegrationTests::applyAuthenticatedConfiguration);
}

1
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

@ -491,6 +491,7 @@ public class ServerProperties { @@ -491,6 +491,7 @@ public class ServerProperties {
/**
* Whether to reject requests with illegal header names or values.
* @deprecated since 2.7.12 for removal in 3.3.0
*/
@Deprecated(since = "2.7.12", forRemoval = true) // Remove in 3.3
private boolean rejectIllegalHeader = true;

1
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqExceptionTranslatorTests.java

@ -39,6 +39,7 @@ import static org.mockito.Mockito.never; @@ -39,6 +39,7 @@ import static org.mockito.Mockito.never;
* Tests for {@link JooqExceptionTranslator}
*
* @author Andy Wilkinson
* @deprecated since 3.3.0 for removal in 3.5.0
*/
@Deprecated(since = "3.3.0")
@SuppressWarnings("removal")

2
spring-boot-project/spring-boot-test-autoconfigure/src/dockerTest/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTestDockerTests.java

@ -42,7 +42,7 @@ import static org.springframework.boot.test.autoconfigure.AutoConfigurationImpor @@ -42,7 +42,7 @@ import static org.springframework.boot.test.autoconfigure.AutoConfigurationImpor
*/
@DataLdapTest
@Testcontainers(disabledWithoutDocker = true)
public class DataLdapTestDockerTests {
class DataLdapTestDockerTests {
@Container
@ServiceConnection

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/Definition.java

@ -23,6 +23,7 @@ import org.springframework.util.ObjectUtils; @@ -23,6 +23,7 @@ import org.springframework.util.ObjectUtils;
*
* @author Phillip Webb
* @see DefinitionsParser
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/DefinitionsParser.java

@ -41,6 +41,7 @@ import org.springframework.util.StringUtils; @@ -41,6 +41,7 @@ import org.springframework.util.StringUtils;
*
* @author Phillip Webb
* @author Stephane Nicoll
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockDefinition.java

@ -37,6 +37,7 @@ import static org.mockito.Mockito.mock; @@ -37,6 +37,7 @@ import static org.mockito.Mockito.mock;
* A complete definition that can be used to create a Mockito mock.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizer.java

@ -28,6 +28,7 @@ import org.springframework.test.context.MergedContextConfiguration; @@ -28,6 +28,7 @@ import org.springframework.test.context.MergedContextConfiguration;
* A {@link ContextCustomizer} to add Mockito support.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactory.java

@ -27,6 +27,7 @@ import org.springframework.test.context.TestContextAnnotationUtils; @@ -27,6 +27,7 @@ import org.springframework.test.context.TestContextAnnotationUtils;
* A {@link ContextCustomizerFactory} to add Mockito support.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/QualifierDefinition.java

@ -34,6 +34,7 @@ import org.springframework.core.annotation.MergedAnnotations; @@ -34,6 +34,7 @@ import org.springframework.core.annotation.MergedAnnotations;
* @author Phillip Webb
* @author Stephane Nicoll
* @see Definition
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java

@ -37,6 +37,7 @@ import static org.mockito.Mockito.mock; @@ -37,6 +37,7 @@ import static org.mockito.Mockito.mock;
* A complete definition that can be used to create a Mockito spy.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/AbstractMockBeanOnGenericExtensionTests.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito;
* Concrete implementation of {@link AbstractMockBeanOnGenericTests}.
*
* @author Madhura Bhave
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/AbstractMockBeanOnGenericTests.java

@ -31,6 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -31,6 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @param <T> type of thing
* @param <U> type of something
* @author Madhura Bhave
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/DefinitionsParserTests.java

@ -36,6 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; @@ -36,6 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* Tests for {@link DefinitionsParser}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanContextCachingTests.java

@ -42,6 +42,7 @@ import static org.mockito.Mockito.mock; @@ -42,6 +42,7 @@ import static org.mockito.Mockito.mock;
* Tests for application context caching when using {@link MockBean @MockBean}.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanForBeanFactoryIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.Mockito.mock; @@ -34,6 +34,7 @@ import static org.mockito.Mockito.mock;
* Test {@link MockBean @MockBean} for a factory bean.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationClassForExistingBeanIntegrationTests.java

@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.given; @@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.given;
* existing beans.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationClassForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
* instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@ExtendWith(SpringExtension.class)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationFieldForExistingBeanIntegrationTests.java

@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.given; @@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.given;
* used to replace existing beans.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@ExtendWith(SpringExtension.class)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnConfigurationFieldForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
* used to inject new mock instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@ExtendWith(SpringExtension.class)

33
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnContextHierarchyIntegrationTests.java

@ -20,10 +20,6 @@ import org.junit.jupiter.api.Test; @@ -20,10 +20,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBeanOnContextHierarchyIntegrationTests.ChildConfig;
import org.springframework.boot.test.mock.mockito.MockBeanOnContextHierarchyIntegrationTests.ParentConfig;
import org.springframework.boot.test.mock.mockito.example.ExampleService;
import org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
@ -38,12 +34,13 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -38,12 +34,13 @@ import static org.assertj.core.api.Assertions.assertThat;
* {@link ContextHierarchy @ContextHierarchy}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)
@ExtendWith(SpringExtension.class)
@ContextHierarchy({ @ContextConfiguration(classes = ParentConfig.class),
@ContextConfiguration(classes = ChildConfig.class) })
@ContextHierarchy({ @ContextConfiguration(classes = MockBeanOnContextHierarchyIntegrationTests.ParentConfig.class),
@ContextConfiguration(classes = MockBeanOnContextHierarchyIntegrationTests.ChildConfig.class) })
class MockBeanOnContextHierarchyIntegrationTests {
@Autowired
@ -53,22 +50,30 @@ class MockBeanOnContextHierarchyIntegrationTests { @@ -53,22 +50,30 @@ class MockBeanOnContextHierarchyIntegrationTests {
void testMocking() {
ApplicationContext context = this.childConfig.getContext();
ApplicationContext parentContext = context.getParent();
assertThat(parentContext.getBeanNamesForType(ExampleService.class)).hasSize(1);
assertThat(parentContext.getBeanNamesForType(ExampleServiceCaller.class)).isEmpty();
assertThat(context.getBeanNamesForType(ExampleService.class)).isEmpty();
assertThat(context.getBeanNamesForType(ExampleServiceCaller.class)).hasSize(1);
assertThat(context.getBean(ExampleService.class)).isNotNull();
assertThat(context.getBean(ExampleServiceCaller.class)).isNotNull();
assertThat(parentContext
.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleService.class)).hasSize(1);
assertThat(parentContext
.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class))
.isEmpty();
assertThat(context.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleService.class))
.isEmpty();
assertThat(context
.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class))
.hasSize(1);
assertThat(context.getBean(org.springframework.boot.test.mock.mockito.example.ExampleService.class))
.isNotNull();
assertThat(context.getBean(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class))
.isNotNull();
}
@Configuration(proxyBeanMethods = false)
@MockBean(ExampleService.class)
@MockBean(org.springframework.boot.test.mock.mockito.example.ExampleService.class)
static class ParentConfig {
}
@Configuration(proxyBeanMethods = false)
@MockBean(ExampleServiceCaller.class)
@MockBean(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class)
static class ChildConfig implements ApplicationContextAware {
private ApplicationContext context;

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnScopedProxyTests.java

@ -38,6 +38,7 @@ import static org.mockito.BDDMockito.given; @@ -38,6 +38,7 @@ import static org.mockito.BDDMockito.given;
*
* @author Phillip Webb
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5724">gh-5724</a>
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestClassForExistingBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
* Test {@link MockBean @MockBean} on a test class can be used to replace existing beans.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestClassForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
* instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanCacheIntegrationTests.java

@ -36,6 +36,7 @@ import static org.mockito.BDDMockito.given; @@ -36,6 +36,7 @@ import static org.mockito.BDDMockito.given;
*
* @author Phillip Webb
* @see MockBeanOnTestFieldForExistingBeanIntegrationTests
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanConfig.java

@ -27,6 +27,7 @@ import org.springframework.context.annotation.Import; @@ -27,6 +27,7 @@ import org.springframework.context.annotation.Import;
* config to trigger caching.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
*
* @author Phillip Webb
* @see MockBeanOnTestFieldForExistingBeanCacheIntegrationTests
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForExistingBeanWithQualifierIntegrationTests.java

@ -39,6 +39,7 @@ import static org.mockito.BDDMockito.then; @@ -39,6 +39,7 @@ import static org.mockito.BDDMockito.then;
*
* @author Stephane Nicoll
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanOnTestFieldForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
* instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithAopProxyTests.java

@ -45,6 +45,7 @@ import static org.mockito.Mockito.times; @@ -45,6 +45,7 @@ import static org.mockito.Mockito.times;
*
* @author Phillip Webb
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithAsyncInterfaceMethodIntegrationTests.java

@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.given; @@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.given;
* Tests for a mock bean where the mocked interface has an async method.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests.java

@ -36,6 +36,7 @@ import static org.mockito.BDDMockito.given; @@ -36,6 +36,7 @@ import static org.mockito.BDDMockito.given;
* {@link DirtiesContext @DirtiesContext} and {@link ClassMode#BEFORE_EACH_TEST_METHOD}.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithGenericsOnTestFieldForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.given;
* instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithInjectedFieldIntegrationTests.java

@ -31,6 +31,7 @@ import static org.mockito.BDDMockito.given; @@ -31,6 +31,7 @@ import static org.mockito.BDDMockito.given;
* Tests for a mock bean where the class being mocked uses field injection.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockBeanWithSpringMethodRuleRepeatJUnit4IntegrationTests.java

@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
* @see <a href="https://github.com/spring-projects/spring-boot/issues/27693">gh-27693</a>
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockDefinitionTests.java

@ -33,6 +33,7 @@ import static org.mockito.Mockito.mock; @@ -33,6 +33,7 @@ import static org.mockito.Mockito.mock;
* Tests for {@link MockDefinition}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockResetTests.java

@ -28,6 +28,7 @@ import static org.mockito.Mockito.withSettings; @@ -28,6 +28,7 @@ import static org.mockito.Mockito.withSettings;
* Tests for {@link MockReset}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerFactoryTests.java

@ -26,6 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -26,6 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* Tests for {@link MockitoContextCustomizerFactory}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoContextCustomizerTests.java

@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* Tests for {@link MockitoContextCustomizer}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessorTests.java

@ -50,6 +50,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; @@ -50,6 +50,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* @author Andy Wilkinson
* @author Andreas Neiser
* @author Madhura Bhave
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerIntegrationTests.java

@ -49,6 +49,7 @@ import static org.mockito.BDDMockito.given; @@ -49,6 +49,7 @@ import static org.mockito.BDDMockito.given;
* Integration tests for {@link MockitoTestExecutionListener}.
*
* @author Moritz Halbritter
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/MockitoTestExecutionListenerTests.java

@ -41,6 +41,7 @@ import static org.mockito.Mockito.mock; @@ -41,6 +41,7 @@ import static org.mockito.Mockito.mock;
* Tests for {@link MockitoTestExecutionListener}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java

@ -40,6 +40,7 @@ import static org.mockito.BDDMockito.then; @@ -40,6 +40,7 @@ import static org.mockito.BDDMockito.then;
* Tests for {@link QualifierDefinition}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/ResetMocksTestExecutionListenerTests.java

@ -39,6 +39,7 @@ import static org.mockito.Mockito.mock; @@ -39,6 +39,7 @@ import static org.mockito.Mockito.mock;
*
* @author Phillip Webb
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolverIntegrationTests.java

@ -25,6 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -25,6 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* Integration tests for {@link SpringBootMockResolver}.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolverTests.java

@ -29,6 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -29,6 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* Tests for {@link SpringBootMockResolver}.
*
* @author Moritz Halbritter
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationClassForExistingBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then;
* beans.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationClassForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then;
* instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationFieldForExistingBeanIntegrationTests.java

@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.then; @@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.then;
* to replace existing beans.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnConfigurationFieldForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then;
* to inject new spy instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

34
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnContextHierarchyIntegrationTests.java

@ -20,11 +20,6 @@ import org.junit.jupiter.api.Test; @@ -20,11 +20,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.SpyBeanOnContextHierarchyIntegrationTests.ChildConfig;
import org.springframework.boot.test.mock.mockito.SpyBeanOnContextHierarchyIntegrationTests.ParentConfig;
import org.springframework.boot.test.mock.mockito.example.ExampleService;
import org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller;
import org.springframework.boot.test.mock.mockito.example.SimpleExampleService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
@ -39,12 +34,13 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -39,12 +34,13 @@ import static org.assertj.core.api.Assertions.assertThat;
* {@link ContextHierarchy @ContextHierarchy}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)
@ExtendWith(SpringExtension.class)
@ContextHierarchy({ @ContextConfiguration(classes = ParentConfig.class),
@ContextConfiguration(classes = ChildConfig.class) })
@ContextHierarchy({ @ContextConfiguration(classes = SpyBeanOnContextHierarchyIntegrationTests.ParentConfig.class),
@ContextConfiguration(classes = SpyBeanOnContextHierarchyIntegrationTests.ChildConfig.class) })
class SpyBeanOnContextHierarchyIntegrationTests {
@Autowired
@ -54,22 +50,30 @@ class SpyBeanOnContextHierarchyIntegrationTests { @@ -54,22 +50,30 @@ class SpyBeanOnContextHierarchyIntegrationTests {
void testSpying() {
ApplicationContext context = this.childConfig.getContext();
ApplicationContext parentContext = context.getParent();
assertThat(parentContext.getBeanNamesForType(ExampleService.class)).hasSize(1);
assertThat(parentContext.getBeanNamesForType(ExampleServiceCaller.class)).isEmpty();
assertThat(context.getBeanNamesForType(ExampleService.class)).isEmpty();
assertThat(context.getBeanNamesForType(ExampleServiceCaller.class)).hasSize(1);
assertThat(context.getBean(ExampleService.class)).isNotNull();
assertThat(context.getBean(ExampleServiceCaller.class)).isNotNull();
assertThat(parentContext
.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleService.class)).hasSize(1);
assertThat(parentContext
.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class))
.isEmpty();
assertThat(context.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleService.class))
.isEmpty();
assertThat(context
.getBeanNamesForType(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class))
.hasSize(1);
assertThat(context.getBean(org.springframework.boot.test.mock.mockito.example.ExampleService.class))
.isNotNull();
assertThat(context.getBean(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class))
.isNotNull();
}
@Configuration(proxyBeanMethods = false)
@SpyBean(SimpleExampleService.class)
@SpyBean(org.springframework.boot.test.mock.mockito.example.SimpleExampleService.class)
static class ParentConfig {
}
@Configuration(proxyBeanMethods = false)
@SpyBean(ExampleServiceCaller.class)
@SpyBean(org.springframework.boot.test.mock.mockito.example.ExampleServiceCaller.class)
static class ChildConfig implements ApplicationContextAware {
private ApplicationContext context;

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestClassForExistingBeanIntegrationTests.java

@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.then; @@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.then;
* Test {@link SpyBean @SpyBean} on a test class can be used to replace existing beans.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestClassForNewBeanIntegrationTests.java

@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.then; @@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.then;
* Test {@link SpyBean @SpyBean} on a test class can be used to inject new spy instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests.java

@ -36,6 +36,7 @@ import static org.mockito.BDDMockito.then; @@ -36,6 +36,7 @@ import static org.mockito.BDDMockito.then;
*
* @author Phillip Webb
* @see SpyBeanOnTestFieldForExistingBeanIntegrationTests
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanConfig.java

@ -27,6 +27,7 @@ import org.springframework.context.annotation.Import; @@ -27,6 +27,7 @@ import org.springframework.context.annotation.Import;
* config to trigger caching.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then;
*
* @author Phillip Webb
* @see SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingBeanWithQualifierIntegrationTests.java

@ -38,6 +38,7 @@ import static org.mockito.BDDMockito.then; @@ -38,6 +38,7 @@ import static org.mockito.BDDMockito.then;
* bean while preserving qualifiers.
*
* @author Andreas Neiser
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

5
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingCircularBeansIntegrationTests.java

@ -20,7 +20,6 @@ import org.junit.jupiter.api.Test; @@ -20,7 +20,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.SpyBeanOnTestFieldForExistingCircularBeansIntegrationTests.SpyBeanOnTestFieldForExistingCircularBeansConfig;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
@ -32,11 +31,13 @@ import static org.mockito.BDDMockito.then; @@ -32,11 +31,13 @@ import static org.mockito.BDDMockito.then;
* beans with circular dependencies.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = SpyBeanOnTestFieldForExistingCircularBeansConfig.class)
@ContextConfiguration(
classes = SpyBeanOnTestFieldForExistingCircularBeansIntegrationTests.SpyBeanOnTestFieldForExistingCircularBeansConfig.class)
class SpyBeanOnTestFieldForExistingCircularBeansIntegrationTests {
@SpyBean

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingGenericBeanIntegrationTests.java

@ -38,6 +38,7 @@ import static org.mockito.BDDMockito.then; @@ -38,6 +38,7 @@ import static org.mockito.BDDMockito.then;
*
* @author Phillip Webb
* @see SpyBeanOnTestFieldForExistingBeanCacheIntegrationTests
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForExistingGenericBeanProducedByFactoryBeanIntegrationTests.java

@ -39,6 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -39,6 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* bean with generics that's produced by a factory bean.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForMultipleExistingBeansWithOnePrimaryIntegrationTests.java

@ -37,6 +37,7 @@ import static org.mockito.BDDMockito.then; @@ -37,6 +37,7 @@ import static org.mockito.BDDMockito.then;
* instance when there are multiple candidates and one is primary.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanOnTestFieldForNewBeanIntegrationTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then;
* instances.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithAopProxyAndNotProxyTargetAwareTests.java

@ -43,6 +43,7 @@ import static org.mockito.Mockito.reset; @@ -43,6 +43,7 @@ import static org.mockito.Mockito.reset;
*
* @author Phillip Webb
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithAopProxyTests.java

@ -43,6 +43,7 @@ import static org.mockito.BDDMockito.then; @@ -43,6 +43,7 @@ import static org.mockito.BDDMockito.then;
*
* @author Phillip Webb
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests.java

@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.then; @@ -35,6 +35,7 @@ import static org.mockito.BDDMockito.then;
* {@link DirtiesContext @DirtiesContext} and {@link ClassMode#BEFORE_EACH_TEST_METHOD}.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithJdkProxyTests.java

@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then; @@ -34,6 +34,7 @@ import static org.mockito.BDDMockito.then;
* Tests for {@link SpyBean @SpyBean} with a JDK proxy.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyBeanWithNameOnTestFieldForMultipleExistingBeansTests.java

@ -34,6 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -34,6 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Phillip Webb
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/SpyDefinitionTests.java

@ -34,6 +34,7 @@ import static org.mockito.Mockito.mock; @@ -34,6 +34,7 @@ import static org.mockito.Mockito.mock;
* Tests for {@link SpyDefinition}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/CustomQualifier.java

@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Qualifier; @@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
* Custom qualifier for testing.
*
* @author Stephane Nicoll
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@Deprecated(since = "3.4.0", forRemoval = true)
@Qualifier

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/CustomQualifierExampleService.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* An {@link ExampleService} that uses a custom qualifier.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleExtraInterface.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example extra interface for mocking tests.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@Deprecated(since = "3.4.0", forRemoval = true)
public interface ExampleExtraInterface {

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleGenericService.java

@ -21,6 +21,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -21,6 +21,7 @@ package org.springframework.boot.test.mock.mockito.example;
*
* @param <T> the generic type
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@Deprecated(since = "3.4.0", forRemoval = true)
public interface ExampleGenericService<T> {

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleGenericServiceCaller.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example bean for mocking tests that calls {@link ExampleGenericService}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleGenericStringServiceCaller.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example bean for mocking tests that calls {@link ExampleGenericService}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleService.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example service interface for mocking tests.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@Deprecated(since = "3.4.0", forRemoval = true)
public interface ExampleService {

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/ExampleServiceCaller.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example bean for mocking tests that calls {@link ExampleService}.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/FailingExampleService.java

@ -22,6 +22,7 @@ import org.springframework.stereotype.Service; @@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
* An {@link ExampleService} that always throws an exception.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/RealExampleService.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example service implementation for spy tests.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/SimpleExampleIntegerGenericService.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example generic service implementation for spy tests.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/SimpleExampleService.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example service implementation for spy tests.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

1
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/example/SimpleExampleStringGenericService.java

@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example; @@ -20,6 +20,7 @@ package org.springframework.boot.test.mock.mockito.example;
* Example generic service implementation for spy tests.
*
* @author Phillip Webb
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

2
spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/LoadTimeWeaverAwareConsumerImportTestcontainersTests.java

@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest
@DisabledIfDockerUnavailable
@ImportTestcontainers(LoadTimeWeaverAwareConsumerContainers.class)
public class LoadTimeWeaverAwareConsumerImportTestcontainersTests implements LoadTimeWeaverAwareConsumerContainers {
class LoadTimeWeaverAwareConsumerImportTestcontainersTests implements LoadTimeWeaverAwareConsumerContainers {
@Autowired
private LoadTimeWeaverAwareConsumer consumer;

2
spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestContainersParallelStartupIntegrationTests.java

@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@TestPropertySource(properties = "spring.testcontainers.beans.startup=parallel")
@DisabledIfDockerUnavailable
@ExtendWith(OutputCaptureExtension.class)
public class TestContainersParallelStartupIntegrationTests {
class TestContainersParallelStartupIntegrationTests {
@Test
void startsInParallel(CapturedOutput out) {

1
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokDeprecatedProperties.java

@ -25,6 +25,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties; @@ -25,6 +25,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
* Deprecated configuration properties.
*
* @author Stephane Nicoll
* @deprecated deprecated
*/
@Getter
@Setter

1
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/method/DeprecatedClassMethodConfig.java

@ -22,6 +22,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties; @@ -22,6 +22,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
* Sample for testing method configuration with deprecated class.
*
* @author Stephane Nicoll
* @deprecated deprecated
*/
@Deprecated
public class DeprecatedClassMethodConfig {

1
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/DeprecatedProperties.java

@ -22,6 +22,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties; @@ -22,6 +22,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
* Deprecated configuration properties.
*
* @author Stephane Nicoll
* @deprecated deprecated
*/
@Deprecated
@ConfigurationProperties(prefix = "deprecated")

2
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/zip/VirtualZipPerformanceTests.java

@ -37,7 +37,7 @@ import org.junit.jupiter.api.io.TempDir; @@ -37,7 +37,7 @@ import org.junit.jupiter.api.io.TempDir;
* @author Phillip Webb
*/
@Disabled("Only used for manual testing")
public class VirtualZipPerformanceTests {
class VirtualZipPerformanceTests {
@TempDir
Path temp;

2
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactories.java

@ -223,6 +223,8 @@ public final class ClientHttpRequestFactories { @@ -223,6 +223,8 @@ public final class ClientHttpRequestFactories {
/**
* Support for
* {@link org.springframework.http.client.OkHttp3ClientHttpRequestFactory}.
*
* @deprecated since 3.2.0 for removal in 3.4.0
*/
@Deprecated(since = "3.2.0", forRemoval = true)
@SuppressWarnings("removal")

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/json/JsonWriterTests.java

@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; @@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* @author Moritz Halbritter
* @author Phillip Webb
*/
public class JsonWriterTests {
class JsonWriterTests {
private static final Person PERSON = new Person("Spring", "Boot", 10);

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp3Tests.java

@ -33,10 +33,11 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,10 +33,11 @@ import static org.assertj.core.api.Assertions.assertThat;
* client.
*
* @author Andy Wilkinson
* @deprecated since 3.2.0 for removal in 3.4.0
*/
@ClassPathOverrides("com.squareup.okhttp3:okhttp:3.14.9")
@ClassPathExclusions({ "httpclient5-*.jar", "jetty-client-*.jar" })
@Deprecated(since = "3.2.0")
@Deprecated(since = "3.2.0", forRemoval = true)
@SuppressWarnings("removal")
class ClientHttpRequestFactoriesOkHttp3Tests
extends AbstractClientHttpRequestFactoriesTests<OkHttp3ClientHttpRequestFactory> {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp4Tests.java

@ -32,9 +32,10 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -32,9 +32,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* client.
*
* @author Andy Wilkinson
* @deprecated since 3.2.0 for removal in 3.4.0
*/
@ClassPathExclusions({ "httpclient5-*.jar", "jetty-client-*.jar" })
@Deprecated(since = "3.2.0")
@Deprecated(since = "3.2.0", forRemoval = true)
@SuppressWarnings("removal")
class ClientHttpRequestFactoriesOkHttp4Tests
extends AbstractClientHttpRequestFactoriesTests<OkHttp3ClientHttpRequestFactory> {

2
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/src/test/java/smoketest/ant/SampleAntApplicationIT.java

@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Phillip Webb
*/
public class SampleAntApplicationIT {
class SampleAntApplicationIT {
@Test
void runJar() throws Exception {

1
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/test/java/smoketest/data/jpa/SpyBeanSampleDataJpaApplicationTests.java

@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.then; @@ -33,6 +33,7 @@ import static org.mockito.BDDMockito.then;
* Tests for {@link SampleDataJpaApplication} that use {@link SpyBean @SpyBean}.
*
* @author Andy Wilkinson
* @deprecated since 3.4.0 for removal in 3.6.0
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.4.0", forRemoval = true)

Loading…
Cancel
Save