[agent][init]- fix bugs

This commit is contained in:
zeaslity
2023-02-28 10:34:48 +08:00
parent 593d5c1b77
commit f43d9f84a4
3 changed files with 24 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import org.springframework.dao.DuplicateKeyException;
import org.springframework.validation.BindException;
import org.springframework.validation.FieldError;
import org.springframework.validation.ObjectError;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@@ -91,6 +92,20 @@ public class GlobalExceptionHandler {
return vo;
}
/**
* 处理此种异常
*
* @param httpRequestMethodNotSupportedException
*/
@ExceptionHandler(value = {HttpRequestMethodNotSupportedException.class})
public void methodNotMatchHandler(HttpRequestMethodNotSupportedException httpRequestMethodNotSupportedException) {
log.debug(
httpRequestMethodNotSupportedException.getMessage()
);
}
/**
* 拦截数据库异常
*