In my Java Config file there is
@Bean
public CDPlayer cdPlayer(CompactDisc compactDisc){
return new CDPlayer(compactDisc);
}
My book says that the (singleton) CompactDisc is autowired into the method. Why? Because I do not see @Autowired
. How can this work?