BeanFactory没有实例化或者已经关闭了,其实产生错误的原因很简单,没有正确找到Spring配置文件。
Spring实例化BeanFactory的时候是默认到classPath下面查找名为applicationContext.xml的文件的,但是呢,没有找到,所以出现了这个错误。