Skip to content

Commit 01cd521

Browse files
authored
Merge pull request #117 from hocgin/develop
[新增功能](develop): 用户配置
2 parents b15cb00 + d7212a9 commit 01cd521

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-web/web-spring-boot-autoconfigure/src/main/java/in/hocg/boot/web/autoconfiguration/advice/DefaultExceptionAdvice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public ExceptionResult<Void> handleServiceException(ServiceException e) {
4343
}
4444

4545
@ExceptionHandler(Exception.class)
46-
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
46+
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
4747
public ExceptionResult<Void> handleException(Exception e) {
4848
String message = StrUtil.emptyToDefault(e.getMessage(), "系统繁忙, 请稍后");
4949
log.error("服务异常ID: [{}]", IdUtil.randomUUID(), e);
50-
return ExceptionResult.fail(HttpStatus.INTERNAL_SERVER_ERROR.value(), message, e.getClass().getName());
50+
return ExceptionResult.fail(HttpStatus.BAD_REQUEST.value(), message, e.getClass().getName());
5151
}
5252

5353
@ExceptionHandler(HttpMessageNotReadableException.class)

0 commit comments

Comments
 (0)