fix: 通用异常处理

This commit is contained in:
xiongxiaoyang 2025-03-17 10:18:18 +08:00
parent a046899dd6
commit 84a06a7037

View File

@ -3,15 +3,14 @@ package com.java2nb.novel.core.advice;
import io.github.xxyopen.model.resp.RestResult; import io.github.xxyopen.model.resp.RestResult;
import io.github.xxyopen.model.resp.SysResultCode; import io.github.xxyopen.model.resp.SysResultCode;
import io.github.xxyopen.web.exception.BusinessException; import io.github.xxyopen.web.exception.BusinessException;
import org.slf4j.Logger; import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindException; import org.springframework.validation.BindException;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@RestControllerAdvice @RestControllerAdvice
public class CommonExceptionHandler { public class CommonExceptionHandler {
private static final Logger log = LoggerFactory.getLogger(io.github.xxyopen.web.exception.CommonExceptionHandler.class);
public CommonExceptionHandler() { public CommonExceptionHandler() {
} }