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

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 重新编译
一顿操作重启项目就好了
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值