public Map<String, String> populateHeaders() { Map<String, String> headers = new HashMap(); String cookie = this.getCookie(); if (StringUtils.isNoneBlank(new CharSequence[]{cookie})) { headers.put("Cookie", cookie); } String accessToken = this.getAccessToken(); if (StringUtils.isNoneBlank(new CharSequence[]{accessToken})) { headers.put("accessToken", accessToken); } return headers; }
Map<String, String> headers = new HashMap();
headers.put("Cookie", cookie);
headers.put("accessToken", accessToken);
object bopFeign.getWarehouse(wRequest, headers);
@FeignClient(value = "test-bop-service")
public interface TestBopFeign {
@GetMapping(value = "/getPageWarehouse") object getWarehouse(@SpringQueryMap WarRequest wRequest,@RequestHeader Map<String, String> headers);
}
标签:FeignClient,accessToken,clound,spring,headers,cookie,put,new,Map From: https://www.cnblogs.com/lanliying/p/18294821