Migration Guide from 3.x to 4.x

用于 Apache Cassandra 的 Spring Data 4.0 在从早期的版本升级时引入了一组重大更改。

Spring Data for Apache Cassandra 4.0 introduces a set of breaking changes when upgrading from earlier versions.

Asynchronous Template API

使用 ListenableFutureAsyncCqlOperationsAsyncCassandraOperations 以及其依赖类后,已迁移到 CompletableFuture。如果你的应用程序严重依赖于 ListenableFuture,并且你无法轻松迁移到 CompletableFuture,那么我们建议切换到 legacy 子包中的传统 Async…Operations 类型。对于 AsyncCqlOperations,即 org.springframework.data.cassandra.core.cql.legacy;对于 AsyncCassandraOperations,即 org.springframework.data.cassandra.core.legacy

With the deprecation of ListenableFuture, AsyncCqlOperations and AsyncCassandraOperations and their dependant classes were migrated to CompletableFuture. If your application heavily depends on ListenableFuture and you cannot easily migrate to CompletableFuture then we suggest switching to the legacy Async…Operations types in the legacy subpackage. That is org.springframework.data.cassandra.core.cql.legacy for AsyncCqlOperations and org.springframework.data.cassandra.core.legacy for AsyncCassandraOperations.