小编pho*_*nix的帖子

节俭包括两个同名文件?

我有这个结构:(命名空间是java)

package/common.thrift
common.thrift
fileA.thrift
Run Code Online (Sandbox Code Playgroud)

我希望fileA.thrift包括common.thrift

include ".../package/common.thrift"
include "common.thrift"

struct A {
   1: common.Something something #From first file (no error)
   2: common.SomethingElse else  #This throws error.
}
Run Code Online (Sandbox Code Playgroud)

Thrift只从顺序指定的文件中读取内容。有没有办法common.thrift as common 做到这一点:这样我就可以区分它们。或唯一的解决方案是使用不同的文件名

java thrift package

4
推荐指数
1
解决办法
607
查看次数

标签 统计

java ×1

package ×1

thrift ×1