Spring doesn't autowire fields when runner invokes '@Before' method
问题 I have following test: @RunWith(Parameterized.class) @SpringBootTest @ContextConfiguration(classes = MyConfig.class) public class OrderPlacementCancelTest { @Autowired private TestSessionsHolderPerf sessionsHolder; @ClassRule public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule(); @Rule public final SpringMethodRule springMethodRule = new SpringMethodRule(); private CommonCredentialSetter commonCredentialSetter; @Before public void login() throws InterruptedException {