<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.1.Final</version>
</extension>
</extensions>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.1.Final</version>
</extension>
</extensions>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>test-compile</goal>
<goal>compile</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${protobuf-version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>test-compile</goal>
<goal>compile</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${protobuf-version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</execution>
</executions>
</plugin>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
这将生成一个名为 AddressBookProtos 的 Java 类,其中包含 Person 和 AddressBook 的内部类。构建器也为您实施。生成的类实现 com.google.protobuf.Message,这是序列化机制所需要的。因此,只有这些类在交换的正文中使用很重要。如果您试图告诉 Data Format 使用没有实现 com.google.protobuf.Message 的类,Camel 将抛出一个例外。使用生成的构建器从任何现有域类转换数据。