@ Bean public Javers getJavers ( final PlatformTransactionManager txManager ) { final JaversSqlRepository sqlRepository = SqlRepositoryBuilder . sqlRepository ( ) . withConnectionProvider ( new ConnectionProvider ( ) { @ Override public Connection getConnection ( ) { final SessionImpl session = ( SessionImpl ) entityManager . unwrap ( Session . class ) ; return session . connection ( ) ; } } ) . withDialect ( DialectName . POSTGRES ) . build ( ) ; return TransactionalJaversBuilder . javers ( ) . withTxManager ( txManager ) . withObjectAccessHook ( new HibernateUnproxyObjectAccessHook ( ) ) . registerJaversRepository ( sqlRepository ) . withMappingStyle ( MappingStyle . BEAN ) . build ( ) ; }
Gets the javers .