今天使用feign组件,结果启动就报错:

java.lang.IllegalStateException: Service id not legal hostname(eureka_discovery1)

spring cloud之java.lang.IllegalStateException: Service id not legal hostname

报错信息如上,我的@FeignClient 中name是 eureka_discovery1(这个主要是根据 要远程调用工程的spring.application.name的名称)

 

spring cloud之java.lang.IllegalStateException: Service id not legal hostname

原来Feign中不支持下划线_    将下划线改成- 即可!!!!!!!!!!!

 

可参考https://github.com/spring-cloud/spring-cloud-netflix/issues/1582

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
  • 2021-12-19
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-02-03
  • 2021-05-17
  • 2021-12-02
相关资源
相似解决方案