ApplicationContext ctx = new ClassPathXmlApplicationContext( \"com/springinaction/springidol/spring-idol.xml\"); Performer performer = (Performer) ctx.getBean(\"
By default, Spring ApplicationContext eagerly creates and initializes all ‘singleton scoped‘ beans during application startup itself. ApplicationContext makes the bean available in BeanFactory. getBean() returns the instance of the bean.