2016-11-25 15 views

回答

0

我想你想在同一交易做三個SQL,您可以使用org.springframework.transaction.annotation.Transactional到控制器的回滾,請確保完成所有的操作在同一交易

@org.springframework.transaction.annotation.Transactional 
public void executeSQL() { 
    insert records in table A 
    update records in table B 
    delete records in table c 
} 
相關問題