Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakharchenko committed Mar 25, 2020
1 parent d300483 commit 5d2a7c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ public class SpringAnnotationTest extends CachingConfigurerSupport {

@Bean()
public OrmQueryFactory ormQueryFactory() {
OrmQueryFactory ormQueryFactory = OrmQueryFactoryInit.create(dataSource())
OrmQueryFactoryInit.create(dataSource())
.transactionCacheManager(new TransactionCacheManagerImpl(cacheManager()))
.transactionalEventPublisher(transactionAwareApplicationEventPublisher)
.transactionManager(transactionNameManager).build();
return ormQueryFactory;
.transactionalEventPublisher(transactionAwareApplicationEventPublisher) // event publisher
.debug() // show all sql queries in console
.cacheRegion("cache-orm") // cache region
.transactionManager(transactionNameManager)
.build();
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ public DbStructureService staticStructure() {

@Bean()
public OrmQueryFactory ormQueryFactory() {
OrmQueryFactory ormQueryFactory = OrmQueryFactoryInit.create(dataSource())
return OrmQueryFactoryInit.create(dataSource())
.transactionCacheManager(new TransactionCacheManagerImpl(cacheManager()))
.transactionalEventPublisher(transactionAwareApplicationEventPublisher)
.debug().cacheRegion("cache-orm")
.transactionManager(transactionNameManager).build();
return ormQueryFactory;
.transactionalEventPublisher(transactionAwareApplicationEventPublisher) // event publisher
.debug() // show all sql queries in console
.cacheRegion("cache-orm") // cache region
.transactionManager(transactionNameManager)
.build();
}

@Bean()
Expand Down

0 comments on commit 5d2a7c5

Please sign in to comment.