新着情報

3.2 以降の 4.0 の変更点

Spring Framework 7.0

このバージョンには Spring Framework 7.0 が必要です。

null セーフ

他の多くの Spring ポートフォリオプロジェクトと同様に、Spring AMQP は API の null 性を宣言するために JSpecify (英語) アノテーションに移行されました。NullAway [GitHub] (英語) Gradle プラグインは、null 安全性宣言の一貫性をチェックするために使用されます。

spring-rabbitmq-client モジュール

新しい spring-rabbitmq-client モジュール(アーティファクト名は同じ)が導入されました。これは、4.0 以降 RabbitMQ に固有の AMQP 1.0 プロトコルの実装であり、com.rabbitmq.client:amqp-client ライブラリに基づいています。

詳細については、RabbitMQ AMQP 1.0 サポートを参照してください。

JUnit 4 ユーティリティの廃止

JUnit 4 の最新リリースは 2021 年 2 月の 4.13.2 で、次の JUnit 6 は Java 17 をベースにしたバージョンになります。古いユーティリティを使い続ける必要はありません。JUnit Jupiter 用のツールへの移行をお勧めします。

Jackson 3 サポート

Jackson 2 は Spring ポートフォリオ全体から削除され、非推奨となりました。Jackson 3 をサポートするために、それぞれ新しいクラスが導入されました。

詳細については、メッセージコンバーターを参照してください。

MessageListenerContainer の変更

SimpleMessageListenerContainer は、シャットダウン時に、指定された RabbitTemplate リスナーからの保留中の応答を最大で shutdownTimeout まで待機するようになりました。

Migration to Spring Core Retry

The Spring Retry API and usage in the project have been replaced with similar API from spring-core module. The respective org.springframework.retry:spring-retry dependency has been removed. This is a breaking change, but reasonable for the current new major generation of the whole Spring portfolio. See new convenient classes: StatelessRetryOperationsInterceptor and StatefulRetryOperationsInterceptor. The SendRetryContextAccessor was removed in favor of the MessageRecoverer contract. The replyTo address of the failure could be obtained from the ReplyFailureException propagated after retry exhausted into the mentioned MessageRecoverer.