在Spring Boot中使用JpaRepository的deleteById(ID id)方法刪除數據時,首先要使用existsById(ID id)方法判斷數據是否存在。如果存在,再刪除。
確定! 回上一頁