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

来源:互联网 发布:企业网络搭建试题 编辑:程序博客网 时间:2024/06/05 17:24

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

2. meaven 
    

<dependency>    <groupId>org.apache.thrift</groupId>    <artifactId>libthrift</artifactId>    <version>0.9.3</version></dependency>


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

  • 配置编译环境

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















1 0
原创粉丝点击