[agent][init]- fix bugs
This commit is contained in:
@@ -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()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 拦截数据库异常
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user