Helius
2022-07-04 2736d16a8b1804f7291a56a147f76ef3584d6619
src/main/java/com/xcong/farmer/cms/configurations/GlobalExceptionHandler.java
@@ -1,5 +1,6 @@
package com.xcong.farmer.cms.configurations;
import com.xcong.farmer.cms.common.exception.GlobalException;
import com.xcong.farmer.cms.common.response.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.dao.DuplicateKeyException;
@@ -55,6 +56,11 @@
        return Result.fail("系统异常");
    }
    @ExceptionHandler(value = {GlobalException.class})
    public Result handleException(GlobalException e) {
        return Result.fail(e.getMessage());
    }
    /**
     * spring security 账户密码验证异常
     *