Feign 不能注入报错及接口参数问题

 

无法实例 解决方案:

  @EnableFeignClients(basePackages = "com.test.test.service") 要指定路径,

  如果有设置@ComponentScan 或者 其组合注解 @SpringBootApplication 会冲突两种注解都会搜索注入指定目录中的 bean.如果两种注解都使用时,其中@EnableFeignClients会覆盖 @ComponentScan 中指定的目录,从而恢复到默认目录

  在 @EnableFeignClients中通过 clients 属性指定 bean 目录 @EnableFeignClients(clients = MovieServiceFeign.class)

https://www.jb51.net/article/106950.htm

 

  一、FeignClient接口,不能使用@GettingMapping 之类的组合注解,有时候不报错

    

  二、FeignClient接口参数

    简单参数

    

    复杂参数

 

posted @ 2019-06-03 23:49  吃个甜柚子  阅读(5582)  评论(0编辑  收藏  举报
//升天火箭