diff --git a/spring-test/src/main/java/org/springframework/test/context/support/TestConstructorUtils.java b/spring-test/src/main/java/org/springframework/test/context/support/TestConstructorUtils.java index a11e8afb7a2..b32fd459e66 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/TestConstructorUtils.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/TestConstructorUtils.java @@ -91,8 +91,7 @@ public abstract class TestConstructorUtils { return true; } - // Default to Autowire.ANNOTATED semantics. - AutowireMode autowireMode = AutowireMode.ANNOTATED; + AutowireMode autowireMode = null; // Is the test class annotated with @TestConstructor? TestConstructor testConstructor = AnnotatedElementUtils.findMergedAnnotation(testClass, TestConstructor.class);