mirror of https://gitee.com/stylefeng/guns
【7.1.5】mybatis异常打出堆栈
parent
4db6cc4117
commit
867ed75d89
|
@ -242,7 +242,7 @@ public class GlobalExceptionHandler {
|
|||
@ExceptionHandler(MyBatisSystemException.class)
|
||||
@ResponseBody
|
||||
public ErrorResponseData persistenceException(MyBatisSystemException e) {
|
||||
log.error(">>> mybatis操作出现异常,具体信息为:{}", e.getMessage());
|
||||
log.error(">>> mybatis操作出现异常,", e);
|
||||
Throwable cause = e.getCause();
|
||||
if (cause instanceof PersistenceException) {
|
||||
Throwable secondCause = cause.getCause();
|
||||
|
|
Loading…
Reference in New Issue