My @Configuration defines a couple of beans - A & B
@Configuration
public class MyConfiguration {
@Bean
public A supplyA() {
return new A(...);
}
@Bean
public B supplyB() {
return new B(...);
}
}
I was expecting that I should @Autowire A and B where they are needed, like so:
@Controller
public MyController {
@Autowire
public MyController(A a, B b) {
}
}
But it does work fine without the @Autowire on the constructor. What gives? (I'm on Spring 5 if that matters)