【发布时间】:2015-08-09 16:26:37
【问题描述】:
当前项目使用 spring-cloud-starter-eureka 版本 1.0.0.RELEASE。
我正在使用 Ribbon 连接到其他一些服务并需要自定义标头。
@Autowired
private RestTemplate restTemplate;
. . .
ResponseEntity result = this.restTemplate.exchange("https://FooServices/foos/daily",
HttpMethod.GET,
new HttpEntity(getSpecialHeaders()),
FooView[].class,
new Object[0]);
该代码适用于 Spring Cloud 1.0.0 版。但是,当我移动到 1.0.1 或 1.0.2 时,不再发送自定义标头。
这是出于安全原因而更改还是存在缺陷?
【问题讨论】:
标签: spring-cloud netflix netflix-eureka