win64 IDEA meaven 配置安装Thrift自动生成代码到目录

1.下载  thrift   exe  到指定目录,记得修改为thrift.exe 然后将目录添加到环境变量

2. meaven 
    

<dependency>
    <groupId>org.apache.thriftgroupId>
    <artifactId>libthriftartifactId>
    <version>0.9.3version>
dependency>


3.idea ->settings->plugins->搜索thrift然后安装 thrift Support 插件

  • win64 IDEA meaven 配置安装Thrift自动生成代码到目录_第1张图片

  • 4.  ctrl+shitf+alt+s   项目设置 facets 添加thrift
  • win64 IDEA meaven 配置安装Thrift自动生成代码到目录_第2张图片
  • 指定好out put 路径一般为 src/main就可以  .thrift文件上面的
    namespace java com.thrift
  • com.thrift就制定了输出的包。
  • 然后编译.thrift文件就可以生成文件到指定的目录下。上面的插件需要重启IDEA才会生效的















你可能感兴趣的:(thrift)