Class ReactiveAuditingHandler
java.lang.Object
org.springframework.data.auditing.AuditingHandlerSupport
org.springframework.data.auditing.ReactiveAuditingHandler
- Direct Known Subclasses:
ReactiveIsNewAwareAuditingHandler
Auditing handler to mark entity objects created and modified.
- Since:
- 2.4
- Author:
- Mark Paluch, Christoph Strobl
-
Constructor Summary
ConstructorDescriptionReactiveAuditingHandler
(PersistentEntities entities) Creates a newReactiveAuditingHandler
using the givenPersistentEntities
when looking up auditing metadata. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReactiveAuditingHandler
from
(MappingContext<?, ?> mappingContext) Factory method that creates a newReactiveAuditingHandler
for the givenMappingContext
.<T> reactor.core.publisher.Mono<T>
markCreated
(T source) Marks the given object as created.<T> reactor.core.publisher.Mono<T>
markModified
(T source) Marks the given object as modified.void
setAuditorAware
(ReactiveAuditorAware<?> auditorAware) Setter to inject aReactiveAuditorAware
component to retrieve the current auditor.Methods inherited from class org.springframework.data.auditing.AuditingHandlerSupport
isAuditable, setDateTimeForNow, setDateTimeProvider, setModifyOnCreation
-
Constructor Details
-
ReactiveAuditingHandler
Creates a newReactiveAuditingHandler
using the givenPersistentEntities
when looking up auditing metadata.- Parameters:
entities
- must not be null.
-
-
Method Details
-
from
Factory method that creates a newReactiveAuditingHandler
for the givenMappingContext
.- Parameters:
mappingContext
- must not be null.- Since:
- 3.0
-
setAuditorAware
Setter to inject aReactiveAuditorAware
component to retrieve the current auditor.- Parameters:
auditorAware
- must not be null.
-
markCreated
public <T> reactor.core.publisher.Mono<T> markCreated(T source) Marks the given object as created.- Parameters:
source
- must not be null.
-
markModified
public <T> reactor.core.publisher.Mono<T> markModified(T source) Marks the given object as modified.- Parameters:
source
- must not be null.
-