java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' befo

java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

 

spring的项目中有时候会报错:java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContexthtml

缘由:spring初始化bean对象出错;1)xml的bean的id 有重复;java

                                              2)若是是注解配置:多是注解的名称有重复:spring

只须要将重复的bean 的id和重复的注解改了就好了;post

相关文章
相关标签/搜索