BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration' 以及 Windows 找到端口对应pid

https://www.cnblogs.com/edhg/p/10130112.html

https://blog.csdn.net/yudianxiaoxiao/article/details/93674293

  • 原代码
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableFeignClients
@SpringBootApplication
public class WebappApplication{
   
    public static void main(String[] args) {
        SpringApplication.run(WebappApplication.class, args);
    }
}
  • 修改后代码
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableFeignClients
@SpringBootApplication
public class WebappApplication implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        BeanDefinition bd = beanFactory.getBeanDefinition("feignContext");
        bd.setDependsOn("eurekaServiceRegistry", "inetUtils");
    }

    public static void main(String[] args) {
        SpringApplication.run(WebappApplication.class, args);
    }
}

BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration' 以及 Windows 找到端口对应pid

上一篇:win32-CreateDIBSection的使用


下一篇:利用 Proxy API 实现一个简易 MVVM