controller加上
@Transactional(rollbackOn = Exception.class)
try { } catch (Exception e) {
e.printStackTrace();
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}
controller加上
@Transactional(rollbackOn = Exception.class)
try { } catch (Exception e) {
e.printStackTrace();
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}