事务回滚异常
异常:
JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException .......
Caused by: javax.transaction.RollbackException: Transaction set to rollback only
进行手动回滚导致异常
原因:
一个service调用了另外一个service,嵌套事务,service中都加了事务@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
解决:
在大事务调用service的方法上加了@Transactional(propagation = Propagation.SUPPORTS),成功解决