当然是的。有 maven 插件可以让你在打包的时候自动完成这个事情,不过前提是要安装 protoc <plugin> <groupId>com.github.igor-petruk.protobuf</groupId> <artifactId>protobuf-maven-plugin</artifactId> <version>0.6.3</version> <executions> <execution> <goals> <goal>run</goal> </goals> </execution> </executions> <configuration> <protocCommand>/usr/local/bin/protoc</protocCommand> </configuration> </plugin>
当然是的。有
maven
插件可以让你在打包的时候自动完成这个事情,不过前提是要安装protoc