第一章 Unsatisfied dependency expressed through field 'feignXxService'
初始代码:
ModelMap<Something> getSomething(String testA, String testB);
报错信息:
Error creating bean with name 'xxServiceImpl': Unsatisfied dependency expressed through field 'feignXxService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.test.test.xx.FeignXxService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Method getSomething not annotated with HTTP method type (ex. GET, POST)
案情分析:
这是两个服务间的调用,服务A调用了服务B的getSomething方法,但是服务B并没有设置可远程调用。
改代码后:
@PostMapping(value = "/test/getSomething")
ModelMap<Something> getSomething