加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

使用name创建bean并且不允许创建Singleton bean时出错

发布时间:2020-12-14 06:00:50 所属栏目:Java 来源:网络整理
导读:当我通过JUnit Test Case执行代码时,我收到以下异常 org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘somarFactory’: Singleton bean creation not allowed while the singletons of this factory ar
当我通过JUnit Test Case执行代码时,我收到以下异常

org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘somarFactory’: Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

有人可以建议可能出现的问题吗?

谢谢,
本Kathir

解决方法

Go to this thread

我假设你周围也有同样的问题..
它通过设置JAVA_HOME路径得到解决
并将JDK更新到版本7并尝试重新启动服务器..(solution)

我认为这可以解决你的问题..

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读