Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Spring Batch 框架,我想知道是否可以在事件中打开新@AfterStep事务@AfterJob?
@AfterStep
@AfterJob
我看到当我尝试在这些事件中执行 SQL 查询时,当前事务已关闭。
您是否尝试使用 @Transactional 注释和使用 REQUIRES_NEW 来注释您的方法?