You have the following beans in your configuration class:
@Configuration
public class Config {
@Bean
public Product productMilk() {
return new Product("milk");
}
@Bean
public Product productCheese() {
return new Product("cheese");
}
}
Here is the Application class of your project:
public class Application {
public static void main(String[] args) {
var context = new AnnotationConfigApplicationContext(Config.class);
System.out.println(Arrays.toString(context.getBeanDefinitionNames()));
}
}
How can you get the productMilk bean in the Application class? Choose all possible options.