新建一个配置类

package com.cloud.client.user.feign;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component; import java.util.Arrays; @Component
public class FeignBeanFactoryPostProcessor implements BeanFactoryPostProcessor { @Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (containsBeanDefinition(beanFactory, "feignContext", "eurekaAutoServiceRegistration")) {
BeanDefinition bd = beanFactory.getBeanDefinition("feignContext");
bd.setDependsOn("eurekaAutoServiceRegistration");
}
} private boolean containsBeanDefinition(ConfigurableListableBeanFactory beanFactory, String... beans) {
return Arrays.stream(beans).allMatch(b -> beanFactory.containsBeanDefinition(b));
}
}

详细内容见:https://blog.csdn.net/yudianxiaoxiao/article/details/93674293

Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed while singletons的更多相关文章

  1. Error creating bean with name 'eurekaAutoServiceRegistration'

    spring-boot项目不断重启,报错: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creat ...

  2. EurekaClient项目启动报错Invocation of destroy method failed on bean with name 'scopedTarget.eurekaClient': org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'e

    Disconnected from the target VM, address: '127.0.0.1:51233', transport: 'socket' Eureka Client的使用 使用 ...

  3. ssh整合报错严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx'

    错误描述:eclipse整合ssh的时候 报不能创建名字为xxx的对象 信息: Destroying singletons in org.springframework.beans.factory.s ...

  4. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

    七月 05, 2018 10:26:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRul ...

  5. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'statisticalMapper' defined in file

    ::, [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFact ...

  6. mvn ssm 异常 org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'multipartResolver'

    解决方案: 添加 commons-fileupload-1.2.jar <!-- https://mvnrepository.com/artifact/commons-fileupload/co ...

  7. 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;

    一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...

  8. [bigdata] 启动CM出现 “JDBC Driver class not found: com.mysql.jdbc.Driver” 以及“Error creating bean with name 'serverLogFetcherImpl'”问题的解决方法

    问题:“JDBC Driver class not found: com.mysql.jdbc.Driver”  通过以下命令启动cm [root@hadoop1 ~]# /etc/init.d/cl ...

  9. Spring 异常:Error creating bean with name

    异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx' 我今 ...

  10. Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法

    贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans ...

随机推荐

  1. 设置Eclipse自动补全变量名

    具体配置步骤如下: Windows -> Preferences -> Java -> Editor -> Content Assist 选中 Enable auto-acti ...

  2. Modbus转Profinet 网关 TS-180

    产品简介 实现 PROFINET 网络与串口网络之间的数据通信,三个串口可分别连接具有 RS232 或 RS485 接口的设 备到 PROFINET 网络.即将串口设备转换为 PROFINET 设备. ...

  3. 赛意SMOM和金蝶云星空单据接口对接

    赛意SMOM和金蝶云星空单据接口对接 数据源系统:金蝶云星空 金蝶K/3Cloud在总结百万家客户管理最佳实践的基础上,提供了标准的管理模式:通过标准的业务架构:多会计准则.多币别.多地点.多组织.多 ...

  4. 聊聊卷积神经网络CNN

    卷积神经网络(Convolutional Neural Network,CNN)是一种被广泛应用于图像识别.语音识别和自然语言处理等领域的深度学习模型.与RNN.Transformer模型组成AI的三 ...

  5. ABAP 标准程序选择屏增强 文本显示异常问题处理 MB52 示例 INITIALIZATION. "变量参数:%_ + 屏幕选择字段变量 + _%_APP_%-TEXT %_SSKH_%_APP_%-TEXT = '所属客户'.

    数据筛选 文本 INITIALIZATION. "变量参数:%_ + 屏幕选择字段变量 + _%_APP_%-TEXT   %_SSKH_%_APP_%-TEXT = '所属客户'.

  6. 实例讲解Python 解析JSON实现主机管理

    本文分享自华为云社区<Python 解析JSON实现主机管理>,作者: LyShark. JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,它以易 ...

  7. 自研、好用的ORM 读写分离功能使用

    Fast Framework 作者 Mr-zhong 代码改变世界.... 一.前言 Fast Framework 基于NET6.0 封装的轻量级 ORM 框架 支持多种数据库 SqlServer O ...

  8. 常用sql语句(不定时更新)

    --查询数据库所有表名与表说明 select a.name tableName, b.value tableComment from sysobjects a LEFT JOIN sys.extend ...

  9. MySQL笔记01: MySQL入门_1.1 MySQL概述

    1.1 MySQL概述 MySQL是一个关系数据库管理系统(Relational DataBase Management System,RDBMS).它是一个程序,可以存储大量的种类繁多的数据,并且提 ...

  10. [ABC262F] Erase and Rotate

    Problem Statement You are given a sequence $P = (p_1,p_2,\ldots,p_N)$ that contains $1,2,\ldots,N$ e ...