Propagation.REQUIRES_NEW does not create a new transaction in Spring with JPA

后端 未结 3 750
猫巷女王i
猫巷女王i 2020-12-24 15:16

I have the following scenario. I am using JPA, Spring:

@Autowired
SampleService service;

@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Ex         


        
3条回答
  •  轮回少年
    2020-12-24 15:43

    Please create a bean for the same class(self) and use bean.api(which requires requires_new). It works.

提交回复
热议问题