feat(REQ-1507): 老的待办数据迁移
背景: https://jira.axzo.cn/browse/REQ-1507?goToView=1 影响: 无
This commit is contained in:
parent
ff7739e857
commit
8392acea42
@ -1,5 +1,6 @@
|
||||
package cn.axzo.msg.center.notices.client.handler;
|
||||
|
||||
import cn.axzo.basics.common.exception.ServiceException;
|
||||
import cn.axzo.msg.center.notices.common.enums.ReturnCodeEnum;
|
||||
import cn.axzo.msg.center.notices.common.exception.BizException;
|
||||
import cn.axzo.msg.center.notices.integration.client.DingDingClient;
|
||||
@ -11,6 +12,7 @@ import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.FieldError;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@ -22,7 +24,7 @@ import javax.annotation.Resource;
|
||||
* @since 2021-05-17 15:44
|
||||
*/
|
||||
@Slf4j
|
||||
/*@RestControllerAdvice*/
|
||||
@RestControllerAdvice
|
||||
public class ControllerExceptionHandler {
|
||||
|
||||
@Resource(name = "dingDingClient")
|
||||
@ -34,6 +36,12 @@ public class ControllerExceptionHandler {
|
||||
return CommonResponse.error(e.getBizCode(), e.getMessage());
|
||||
}
|
||||
|
||||
@ExceptionHandler(value = ServiceException.class)
|
||||
public CommonResponse bizException(ServiceException e){
|
||||
log.warn("[mns] ControllerExceptionHandler.bizException Exception", e);
|
||||
return CommonResponse.error(e.getErrorCode(), e.getMessage());
|
||||
}
|
||||
|
||||
@ExceptionHandler(value = IllegalArgumentException.class)
|
||||
public CommonResponse handleIllegalArgumentException(IllegalArgumentException e) {
|
||||
LogUtil.error("[mns] ControllerExceptionHandler.handleIllegalArgumentException Exception message ", e);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user