DATACASS-784 - Add support for reactive auditing.
We now support reactive auditing by providing the EnableReactiveCassandraAuditing annotation. Previously, EnableCassandraAuditing no longer registers ReactiveAuditingEntityCallback for date-only auditing, the callback is now only registered when using EnableReactiveCassandraAuditing.
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
|
||||
This chapter summarizes changes and new features for each release.
|
||||
|
||||
[[new-features.3-1-0]]
|
||||
== What's new in Spring Data for Apache Cassandra 3.1
|
||||
|
||||
* <<cassandra.auditing,Reactive auditing>> enabled through `@EnableReactiveCassandraAuditing`. `@EnableCassandraAuditing` no longer registers `ReactiveAuditingEntityCallback`.
|
||||
|
||||
[[new-features.3-0-0]]
|
||||
== What's new in Spring Data for Apache Cassandra 3.0
|
||||
|
||||
|
||||
@@ -31,3 +31,23 @@ class Config {
|
||||
|
||||
If you expose a bean of type `AuditorAware` to the `ApplicationContext`, the auditing infrastructure picks it up automatically and uses it to determine the current user to be set on domain types.
|
||||
If you have multiple implementations registered in the `ApplicationContext`, you can select the one to be used by explicitly setting the `auditorAwareRef` attribute of `@EnableCassandraAuditing`.
|
||||
|
||||
To enable auditing, leveraging a reactive programming model, use the `@EnableReactiveCassandraAuditing` annotation. +
|
||||
If you expose a bean of type `ReactiveAuditorAware` to the `ApplicationContext`, the auditing infrastructure picks it up automatically and uses it to determine the current user to be set on domain types.
|
||||
If you have multiple implementations registered in the `ApplicationContext`, you can select the one to be used by explicitly setting the `auditorAwareRef` attribute of `@EnableReactiveCassandraAuditing`.
|
||||
|
||||
.Activating reactive auditing using JavaConfig
|
||||
====
|
||||
[source,java]
|
||||
----
|
||||
@Configuration
|
||||
@EnableReactiveCassandraAuditing
|
||||
class Config {
|
||||
|
||||
@Bean
|
||||
public ReactiveAuditorAware<AuditableUser> myAuditorProvider() {
|
||||
return new AuditorAwareImpl();
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user