Singleton bean creation not allowed while the singletons of this factory are indestruction
spring启动错误Singleton bean creation not allowed while the singletons of this factory are indestruction错误来由今天在公司测试线程服务的时候很蛋疼的遇到这个错,网上解释多重多样,最后还是靠我自己猜出来了原因其实很简单,就是你的线程里去拿bean,但是你的主线程在调用这个线程后销毁了,所以bean也会随之销毁,这时候你的线程去获取bean就会报这个错拉解决方法因为我是调的springboot的test,
原创
2020-08-21 20:31:42 ·
6146 阅读 ·
2 评论