Field myFeignClient in com.zkh.controller.FeignController required a bean of type 'com.zkh.feign.MyF

Description:

Field myFeignClient in com.zkh.controller.FeignController required a bean of type 'com.zkh.feign.MyFeignClient' that could not be found.


Action:

Consider defining a bean of type 'com.zkh.feign.MyFeignClient' in your configuration.

feign应用报错,原因是在Application处需要加注解@EnableFeignClients,@EnableFeignClients扫描的是@FeignClient,所以在指定扫描路径时要进行指定,否则会报异常

猜你喜欢

转载自blog.csdn.net/z_k_h/article/details/80180649
今日推荐