BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the Applic

在网上找的时候,很多人说是因为 错误写法:ApplicationContext ctx = new ClassPathXmlApplicationContext(); 时,没有指定配置文件,Spring实例化BeanFactory的时候是默认到classPath下面查找名为applicationContext.xml的文件的,但是又没有指定,所以出现了这个错误。 这就是错误的原因,在括号写上配置文
相关文章
相关标签/搜索