@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);
}
}
- 我是执行后发现tomcat 端口被占用, 然后win中查看端口也没发现端口被占用, 索性就换了个端口, 然后run, 然后就Congratulations!!!!!!
- 更
- 发现用cmd 找不到的端口
netstat -ano| findstr "8002"
- 而用powershell 却可以
Get-Process -Id (Get-NetTCPConnection -LocalPort 8002).OwningProcess
- 然后kill 一波
- 参考链接: https://github.com/spring-cloud/spring-cloud-netflix/issues/1952#issuecomment-322669642
- 参考链接: https://winaero.com/blog/kill-process-windows-10/