クラス ProtobufJsonFormatHttpMessageConverter

java.lang.ObjectSE
org.springframework.http.converter.AbstractHttpMessageConverter<com.google.protobuf.Message>
org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter
org.springframework.http.converter.protobuf.ProtobufJsonFormatHttpMessageConverter
実装されたすべてのインターフェース:
HttpMessageConverter<com.google.protobuf.Message>

public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageConverter
JSON 処理に Protobuf 3 およびその公式ライブラリ "com.google.protobuf:protobuf-java-util" の使用を強制する ProtobufHttpMessageConverter のサブクラス。

最も重要なこととして、このクラスは、JsonFormat ユーティリティを介してカスタム JSON パーサーおよびプリンター構成を可能にします。特別なパーサーまたはプリンター構成が指定されていない場合は、代わりにデフォルトのバリアントが使用されます。

Protobuf 3.x および "com.google.protobuf:protobuf-java-util" 3.x が必要です。3.3 以上を推奨します。

導入:
5.0
作成者:
Juergen Hoeller, Sebastien Deleuze
関連事項:
  • コンストラクターの詳細

    • ProtobufJsonFormatHttpMessageConverter

      public ProtobufJsonFormatHttpMessageConverter()
      JsonFormat.ParserJsonFormat.PrinterExtensionRegistry のデフォルトインスタンスを持つコンストラクター。
    • ProtobufJsonFormatHttpMessageConverter

      public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer)
      JsonFormat.ParserJsonFormat.Printer の特定のインスタンス、ExtensionRegistry のデフォルトインスタンスを持つコンストラクター。
    • ProtobufJsonFormatHttpMessageConverter

      public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer, @Nullable com.google.protobuf.ExtensionRegistry extensionRegistry)
      JsonFormat.ParserJsonFormat.PrinterExtensionRegistry の特定のインスタンスを持つコンストラクター。