【问题标题】:Ocelot Gateway Aggregation: When each API has different Query String parametersOcelot Gateway Aggregation:当每个 API 有不同的 Query String 参数时
【发布时间】:2021-02-19 07:40:55
【问题描述】:

我正在研究微服务,我想聚合来自具有不同查询参数的多个 Get 调用的数据。例如

  1. /api/Users/Clients?clientId=489842&&isClient=true
  2. /api/Bookings/Booking?clientId=489842&FromDate=20201106&ToDate=20210106
  3. /api/Accounts/Salary?clientId=489842&month=03&year=2020

这样做的解决方案是什么? 我发现的唯一解决方案是所有 API 都需要单个/相同的查询参数。

【问题讨论】:

    标签: .net-core microservices aggregation gateway ocelot


    【解决方案1】:

    据我所知,您不能在这种情况下使用 Ocelot 中的聚合。 但是,您可以直接在 ApiGateway 中创建自己的控制器并手动进行聚合。

    【讨论】:

      猜你喜欢
      • 2020-04-25
      • 2023-03-27
      • 2019-11-25
      • 2019-02-27
      • 2020-07-29
      • 2020-04-28
      • 2021-06-10
      • 2016-07-28
      • 2021-01-22
      相关资源
      最近更新 更多