在Nacos中线上环境会偶尔出现这个问题 ,这个是为什么?{
code: 500,
data: null,
message: "Failed to handle request [GET http://test.tech/public/products/by-models]: Error creating bean with name 'ribbonServerList' defined in com.alibaba.cloud.nacos.ribbon.NacosRibbonClientConfiguration: Unsatisfied dependency expressed through method 'ribbonServerList' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'nacosProperties': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)"
}
线上环境偶尔出现的500错误是因为在服务关闭或Bean销毁期间,不当尝试创建Ribbon负载均衡所需的Bean,导致Spring容器管理Bean时出现冲突,检查Bean生命周期管理和应用关闭逻辑。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。