spring中事物回滾與異常try catch相關

再次簡單說一下 try catch / throw new exception /throws exception的區別 try catch是在方法內部對異常進行處理,而且能夠選擇將功能繼續執行. throw new exception是在方法內部,將異常拋出,使其上一級對異常進行處理. 而throws exception則是標識該方法內部可能有異常 使上一級對該異常進行處理.增長代碼的健全性.j
相關文章
相關標籤/搜索