用于SpringBoot服务的Envoy前代理返回连接终止(503)

时间:2019-06-14 13:27:14

标签: spring-boot envoyproxy

我正在尝试使用Envoy作为使用Java Spring Boot构建的简单API的前置代理。但是它返回HTTP状态503:上游连接错误或在标头之前断开连接/重置。重置原因:连接终止 当我用示例中提供的python服务替换服务时,相同的配置也起作用。

我可能缺少一些琐碎的配置-代理REST-JSON服务。 我的Java代码如下所示。

@RestController
@RequestMapping(value = "/customer")
public class Application {

@RequestMapping(value = "/{id}", method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE)
public Customer getCustomer(@PathVariable("id") Integer id) throws Exception{
Customer cust = new Customer(id, "...", "...", new ArrayList<Order>());
return cust;
}
}

如果我将上述Java服务替换为示例中提供的python服务之一,则它可以正常工作。

0 个答案:

没有答案
相关问题