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, .

Logo

「智能机器人开发者大赛」官方平台,致力于为开发者和参赛选手提供赛事技术指导、行业标准解读及团队实战案例解析;聚焦智能机器人开发全栈技术闭环,助力开发者攻克技术瓶颈,促进软硬件集成、场景应用及商业化落地的深度研讨。 加入智能机器人开发者社区iRobot Developer,与全球极客并肩突破技术边界,定义机器人开发的未来范式!

更多推荐