*
* @Auther:ZHURENJIN
@version: 1.0
@Date: 2024 - 04 - 2024/4/16 -16:46
@Description:com.zhurenjin.mybaties.Exception
* */
import com.zhurenjin.mybaties.AjaxResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class GlobalException {
@ExceptionHandler(Exception.class)
public AjaxResult ex(Exception ex){
ex.printStackTrace();
return AjaxResult.error("全局异常信息");
};
}
*
* @Auther:ZHURENJIN
@version: 1.0
@Date: 2024 - 04 - 2024/4/16 -16:46
@Description:com.zhurenjin.mybaties.Exception
* */
import com.zhurenjin.mybaties.AjaxResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class GlobalException {
@ExceptionHandler(Exception.class)
public AjaxResult ex(Exception ex){
ex.printStackTrace();
return AjaxResult.error("全局异常信息");
};
}