问题:
openfeign 调用接口需要注意
解决;
@FeignClient(name = “pointClient”, url = “${app.kim.siteUrl}/api/kim/v1”)
//not work @Headers(“Authorization: ${app.kim.auth}”)
//ok @RequestMapping(headers = “Authorization=Basic ${app.kim.auth}”)
public interface PointClient {
// not work @Headers(“Authorization: 111111”)
@RequestMapping(method = RequestMethod.GET, value = “/app/point/current”, headers=”Authorization=Basic ${app.kim.auth}”)
//not work for @autowired @RequestLine(“GET /api/kim/v1/app/point/current?userId={userId}”)
public String get(@RequestParam int userId);
}
网上也有 @RequestLine 之类的,这种应该不能用 @Autowired