Package org.javers.spring.mongodb
Class TransactionalMongoJaversBuilder
java.lang.Object
org.javers.core.AbstractContainerBuilder
org.javers.core.JaversBuilder
org.javers.spring.mongodb.TransactionalMongoJaversBuilder
public final class TransactionalMongoJaversBuilder
extends org.javers.core.JaversBuilder
Creates transactional Javers instance if
Allows Javers'
Note that multi-document ACID transactions was introduced in MongoDB 4.0 and Spring Data MongoDB 2.1.
See https://www.baeldung.com/spring-data-mongodb-transactions, https://www.mongodb.com/blog/post/mongodb-multi-document-acid-transactions-general-availability
MongoTransactionManager is provided.
Allows Javers'
MongoRepository to participate in application's transactions
managed by MongoTransactionManager.
Note that multi-document ACID transactions was introduced in MongoDB 4.0 and Spring Data MongoDB 2.1.
See https://www.baeldung.com/spring-data-mongodb-transactions, https://www.mongodb.com/blog/post/mongodb-multi-document-acid-transactions-general-availability
- Since:
- 6.5
-
Field Summary
Fields inherited from class org.javers.core.JaversBuilder
logger -
Method Summary
Modifier and TypeMethodDescriptionorg.javers.core.Javersbuild()javers()registerJaversRepository(org.javers.repository.api.JaversRepository mongoRepository) withTxManager(org.springframework.data.mongodb.MongoTransactionManager txManager) Methods inherited from class org.javers.core.JaversBuilder
assembleJaversInstance, assembleJaversInstanceAndEnsureSchema, registerCustomComparator, registerCustomType, registerEntities, registerEntity, registerEntity, registerIgnoredClass, registerIgnoredClassesStrategy, registerJsonAdvancedTypeAdapter, registerObjectHasher, registerType, registerTypes, registerValue, registerValue, registerValue, registerValue, registerValueGsonTypeAdapter, registerValueObject, registerValueObject, registerValueObjects, registerValueTypeAdapter, registerValueWithCustomToString, scanTypeName, withCommitIdGenerator, withCustomCommitIdGenerator, withDateTimeProvider, withInitialChanges, withListCompareAlgorithm, withMappingStyle, withNewObjectsSnapshot, withObjectAccessHook, withPackagesToScan, withPrettyPrint, withPrettyPrintDateFormats, withProperties, withTerminalChanges, withTypeSafeValues, withUsePrimitiveDefaultsMethods inherited from class org.javers.core.AbstractContainerBuilder
addComponent, addModule, addModule, bindComponent, bootContainer, getComponents, getContainer, getContainerComponent, removeComponent
-
Method Details
-
javers
-
withTxManager
public TransactionalMongoJaversBuilder withTxManager(org.springframework.data.mongodb.MongoTransactionManager txManager) - Parameters:
txManager- nullable
-
registerJaversRepository
public TransactionalMongoJaversBuilder registerJaversRepository(org.javers.repository.api.JaversRepository mongoRepository) - Overrides:
registerJaversRepositoryin classorg.javers.core.JaversBuilder
-
build
public org.javers.core.Javers build()- Overrides:
buildin classorg.javers.core.JaversBuilder
-