springcloud-3:required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.
2018-03-29 14:56
1401 查看
在写客户端程序的时候,总是报'com.netflix.discovery.DiscoveryClient' that could not be found。
原因在于导入了错误的类:
com.netflix.discovery.DiscoveryClient
[code]应该是引用:
org.springframework.cloud.client.discovery.DiscoveryClient
相关文章推荐
- required a bean of type 'org.hibernate.SessionFactory' that could not be found.
- Field XXX in XXXX required a bean of type XXXX that could not be found.
- required a bean of type 'org.hibernate.SessionFactory' that could not be found.
- mybatis Field xxxMapper in xxxx required a bean of type 'XXXMapper' that could not be found.
- 解决 A component required a bean of 'XXX.RoleService' that could not be found.
- 记录A component required a bean named 'studentService' that could not be found.
- 【SpringBoot】RestTemplate调用报错:'org.springframework.web.client.RestTemplate' that could not be found.
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.sun.p
- BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.su
- idea中mybatis+spring boot, mapper 提示Could not autowire. No beans of … type found解决办法
- Cause: com.ibatis.sqlmap.client.SqlMapException: No type handler could be found to map the property
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.oskyhang.gbd.service.UserService] found for dependency: expected at least 1 bean which qualifies as aut
- Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示
- spring&Injection of resource dependencies failed&Bean named 'generalDao' must be of type [com.oracle
- Found conflicts between different versions of the same dependent assembly that could not be resolved
- org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named "" must be of type [org.apache.struts.action.Action
- Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not pub
- Field userMapper in com.jm.controller.LoginController required a bean of type 'dao.UserMapper' that