@ Bean ( name = "JaversFromStarter" ) @ ConditionalOnMissingBean public Javers javers ( ) { logger . info ( "Starting javers-spring-boot-starter-mongo ..." ) ; MongoDatabase mongoDatabase = mongoClient . getDatabase ( mongoProperties . getMongoClientDatabase ( ) ) ; logger . info ( "connecting to database: {}" , mongoProperties . getMongoClientDatabase ( ) ) ; MongoRepository javersRepository = createMongoRepository ( javersMongoProperties , mongoDatabase ) ; return JaversBuilder . javers ( ) . registerJaversRepository ( javersRepository ) . withProperties ( javersMongoProperties ) . withObjectAccessHook ( new DBRefUnproxyObjectAccessHook ( ) ) . build ( ) ; }
from spring - boot - starter - data - mongodb