Constructor injection through Java configuration can also utilize autowiring, such as:
@Configuration class AppConfig { @Bean public Bar bar() { return new Bar(); } @Bean public Foo foo(Bar bar) { return new Foo(bar); } }