SpringBoot 使用feign时报错Service id not legal hostname

SpringBoot 使用feign时报错Service id not legal hostname(xx_sss)


原因是feign不支持下划线"_",支持"-",改成xx-sss即可


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


  • Does ribbon support those chars like "_" ? (Though hostname should not contain "_" , but I think it's better to support this feature.)
  • If not, I think we Spring Cloud should mention it, .

发布了124 篇原创文章 · 获赞 0 · 访问量 6741

猜你喜欢

转载自blog.csdn.net/qq_44813090/article/details/104473348