|
@@ -92,7 +92,7 @@ public class GlobalBizExceptionHandler {
|
|
|
* @return R
|
|
* @return R
|
|
|
*/
|
|
*/
|
|
|
@ExceptionHandler({ MethodArgumentNotValidException.class })
|
|
@ExceptionHandler({ MethodArgumentNotValidException.class })
|
|
|
- @ResponseStatus(HttpStatus.BAD_REQUEST)
|
|
|
|
|
|
|
+ @ResponseStatus(HttpStatus.OK)
|
|
|
public R handleBodyValidException(MethodArgumentNotValidException exception) {
|
|
public R handleBodyValidException(MethodArgumentNotValidException exception) {
|
|
|
List<FieldError> fieldErrors = exception.getBindingResult().getFieldErrors();
|
|
List<FieldError> fieldErrors = exception.getBindingResult().getFieldErrors();
|
|
|
log.warn("参数绑定异常,ex = {}", fieldErrors.get(0).getDefaultMessage());
|
|
log.warn("参数绑定异常,ex = {}", fieldErrors.get(0).getDefaultMessage());
|