java.lang.IllegalStateException: Service id not legal hostname

服务名不可匹配,非法的的问题: java.lang.IllegalStateException: Service id not legal hostname (medical_ocr.medical_ocr_app) at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.cloud.openfeign.FeignClientsRegistrar.getName(FeignClientsRegistrar.java:237) ~[spring-cloud-openfeign-core-2.0.0.RELEASE.jar:2.0.0.RELEASE] at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerFeignClient(FeignClientsRegistrar.java:172) ~[spring-cloud-openfeign-core-2.0.0.RELEASE.jar:2.0.0.RELEASE] at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerFeignClients(FeignClientsRegistrar.java:158) ~[spring-cloud-openfeign-core-2.0.0.RELEASE.jar:2.0.0.RELEASE] at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerBeanDefinitions(FeignClientsRegistrar.java:83) ~[spring-cloud-openfeign-core-2.0.0.RELEASE.jar:2.0.0.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:358) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE] at java.util.LinkedHashMap.forEach(LinkedHashMap.java:676) ~[?:1.8.0_73]

使用微服务spring cloud中的@FeignClient,定义的名称不能带下划线"_",属于非字符
复制代码

你可能感兴趣的:(java.lang.IllegalStateException: Service id not legal hostname)