报错信息
Description:
A component required a bean of type 'com.demo.user9998.client.ProductClient' that could not be found.
Action:
Consider defining a bean of type 'com.demo.user9998.client.ProductClient' in your configuration.
报错解释:该类没有被注入,说明没有被扫描到,@SpringBootApplication出现了问题,没有扫描到该类
解决方案
1、将该类放在同使用这个类的同级目录,或者子目录
2、将该类原本的包单独扫描,在启动类上面添加注解
@ComponentScan(basePackages = {"com.demo.user9998.client"} )
详情参考该博主:https://blog.csdn.net/wolfking0608/article/details/82863442