Feign XXX not annotated with HTTP method type (ex. GET, POST)
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
ERROR 15:32:53.326 default [main] o.s.boot.SpringApplication 834 - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MFeignClient': Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: Method MFeignClient#cumulativeDisposal(String,List,String,String) not annotated with HTTP method type (ex. GET, POST)
Warnings:
  • 1.
  • 2.
  • 3.
  • 4.
Caused by: java.lang.IllegalStateException: Method MFeignClient#cumulativeDisposal(String,List,String,String) not annotated with HTTP method type (ex. GET, POST)
Warnings:
-
  • 1.
  • 2.
  • 3.


@FeignClient(name = "M")
public interface MFeignClient {



    Result<Integer> cumulativeDisposal (@RequestParam(value = "entCode") String entCode,
                                           @RequestParam(value = "startTime")  String startTime,
                                           @RequestParam(value = "endTime")    String endTime );
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.


通过异常,找到对应的Feign  发现方法没有加对应的Mapping ;

此时加上     @GetMapping("/M/cumulativeDisposal")  即可解决