BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext
BeanFactory未初始化或已经关闭 - 在通过ApplicationContext访问bean之前调用’refresh’
问题:项目重新调试突然出现BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext4
网上解答:
spring初始化bean对象出错
1)xml的bean的id 有重复;
2)如果是注解配置:可能是注解的名称有重复,只需要将重复的bean 的id和重复的注解改了就行了;
3)web.xml中修改(这里我的配置的有)
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value> classpath:spring/applicationContext.xml</param-value>
</context-param>
我的问题:
可能改了什么文件,我直接maven—>clean,compile 重新编译
一顿操作重启项目就好了