Changed BeanFactory to ApplicationContext (Spring)