gpt4 book ai didi

java - 如何通过单个命令为文件夹中的所有thrift文件生成所有类?

转载 作者:行者123 更新时间:2023-12-02 10:52:39 28 4
gpt4 key购买 nike

现在我对文件夹中的每个文件使用以下命令:

thrift-0.11.0.exe --gen java reswk-manager.thrift

确实很不舒服。

我知道我可以创建用于文件迭代的bat脚本,但我不喜欢它。

可以通过sing命令实现吗?

最佳答案

你可以创建一个类似于 make 文件的 thrift,称为 build.thrift(或其他),如下所示:

include "a.thrift"
include "b.thrift"
include "./somedir/c.thrift"
include "./someotherdir/d.thrift"

然后使用 -r 开关运行 thrift 以递归地构建所有依赖项:

thrift -r -gen java build.thrift

关于java - 如何通过单个命令为文件夹中的所有thrift文件生成所有类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52041629/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com