甚至没有为路由调用zuul服务,直接请求也可以工作。
zuul:localhost:8900 服务:localhost:38000 (当我使用url请求时,路由工作,但如果我使用resttemplate中的以下方法则不行:
public <T> ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String, ?> uriVariables) throws RestClientException {
Type type = responseType.getType();
RequestCallback requestCallback = this.httpEntityCallback(requestEntity, type);
ResponseExtractor responseExtractor = this.responseEntityExtractor(type);
return (ResponseEntity)this.execute(url, method, requestCallback, responseExtractor, uriVariables);
我知道如何让zuul听取这个请求吗?