1. https://jingyan.baidu.com/article/3a2f7c2e27d51b26afd611ff.html
2. https://blog.csdn.net/lee_star1/article/details/71730107
需拋出RuntimeException錯誤
必須是:
throw new RuntimeException("回滾");
例如:
try {
//業務邏輯
} catch (Exception e) {
task = false;
e.printStackTrace();
throw new RuntimeException("數據插入失敗,回滾");
}