Linux-Manual

Apache Thrift 安装和配置

源码包安装方法

tar zxvf thrift-0.9.3.tar.gz

cd thrift-0.9.3

./configure --without-tests

make

make install

Docker 方式直接使用

docker run -v "$PWD:/opt" thrift:0.9.3 thrift -o /opt/thrift/data --gen java /opt/service.thrift
namespace java com.gitnavi.service

struct User {
  1: i32 id
  2: string username
}
 
service UserService {
  User getUser()
}