Combination hibernate @Transactional & ehcache @Cacheable always creates DB transaction

后端 未结 1 986
感情败类
感情败类 2021-02-08 10:44

While doing loadtesting on our application I noticed that if you use @Transactional and @Cacheable annotions that hibernate always creates a database transaction. Is there an ea

相关标签:
1条回答
  • 2021-02-08 11:23

    You need to change relative order of @Transactional and @Cacheable aspects.

    It can be configured using order attribute of <tx:annotation-driven> and <cache:annotation-driven>. See 8.2.4.7 Advice ordering for the meaning of order values.

    0 讨论(0)
提交回复
热议问题