ApplicationContext ctx = new ClassPathXmlApplicationContext(
\"com/springinaction/springidol/spring-idol.xml\");
Performer performer = (Performer) ctx.getBean(\"
By default, all beans are singletons, so whenever Application context gets created, they are all pre-loaded. If, specifically, any singleton bean has an attribute lazy-init="true" set, it will be lazy-loaded, i.e. it will be instantiated when the getBean method is called for the first time.
For other scopes, beans will be instantiated whenever they are requested.