【问题标题】:How to "include" Thrift files from different modules?如何“包含”来自不同模块的 Thrift 文件?
【发布时间】:2014-01-19 07:04:51
【问题描述】:

场景:一个大项目有多个子项目,SBT 构建定义。

rootproject/
  api/
    src/
      main/
       thrift/
         SomeService.thrift
  core/
    src/
      main/
        thrift/
         SomeModel.thrift

SomeService.thrift 中的include SomeModel.thrift 的正确方法是什么?

【问题讨论】:

    标签: scala thrift thrift-protocol twitter-finagle


    【解决方案1】:

    设法找到答案。 路径包含按预期工作:

    SomeService.thrift 看起来像这样:

    include ../../../../SomeModels.thrift
    
    // And then normal IDL definitions
    struct Test {
        1: required SomeModels.Model model
    }
    

    【讨论】:

      猜你喜欢
      • 2021-04-05
      • 1970-01-01
      • 1970-01-01
      • 2016-12-13
      • 2022-01-20
      • 2014-12-10
      • 1970-01-01
      • 1970-01-01
      • 2015-12-10
      相关资源
      最近更新 更多