问题:
create:feign.FeignException: status 500 reading LoginClient#loginTest(String,String); content:
{“timestamp”:”2018-08-16T05:29:47.301+0000”,”status”:500,”error”:”Internal Server Error”,”message”:”Missing URI template variable ‘id’ for method parameter of type String”,”path”:”/msp/loginTest”}
解决方法:重点内容
应该为:
@FeignClient(name=”msp”, fallbackFactory=LoginTestFallbackFactory.class) //这里的name对应调用服务的spring.applicatoin.name
public interface LoginClient {
@RequestMapping(value=”/msp/loginTest/{id}/{pwd}”)
public String loginTest(@PathVariable(“id”) String id, @PathVariable(“pwd”)String pwd);
}
原来我写成这个了,url中没有传递参数
@RequstMapping(value=”/msp/loginTest”)