如何在Scrooge中使用thrift文件生成接口类

时间:2016-01-11 09:48:44

标签: scala scrooge

喜欢这个命令

thrift -r --gen py tutorial.thrift

1 个答案:

答案 0 :(得分:0)

使用以下依赖项在SBT中配置Scrooge:

libraryDependencies += "com.twitter" %% "scrooge-core" % "4.3.0"

然后从命令行运行它,如下所示:

$ ./sbt 'scrooge-generator/run-main com.twitter.scrooge.Main <thrift-file1> [<thrift-file2> ...]'

更多详情here