Fixiaobai
2023-09-04 dd2554435b9ced61e2a6a06627145fca3bf2685b
framework/src/main/java/com/yuanchu/limslaboratory/handler/GlobalExceptionHandler.java
@@ -11,7 +11,11 @@
import org.springframework.beans.TypeMismatchException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.HttpMessageNotWritableException;
import org.springframework.jdbc.BadSqlGrammarException;
@@ -25,6 +29,7 @@
import java.io.IOException;
import java.net.BindException;
import java.sql.SQLException;
import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import java.util.stream.Collectors;
@@ -218,4 +223,6 @@
    public Result<?> noAuth(AuthException e){
        return Result.fail(Integer.valueOf(e.getCode()),e.getMsg());
    }
}