将服务注册到 eureka 中,使用 feign 远程调用服务,服务消费者调用服务提供者,出现的以下错误,
一、报错信息
-
UnsatisfiedDependencyException:不满足依赖异常
SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'courseController':
Unsatisfied dependency expressed through field 'cmsPageClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.yh.manage.course.feign.CmsPageClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: PathVariable annotation was empty on param 0.
Caused by: org.springframework.beans.factory.BeanCreationException:
Caused by: java.lang.IllegalStateException: PathVariable annotation was empty on param 0.
二、错误原因
1.源代码 ---> 报错代码