parent
8c438b57f6
commit
4a1bcc3f53
@ -0,0 +1,20 @@
|
|||||||
|
package com.mashibing;
|
||||||
|
|
||||||
|
import com.mashibing.util.R;
|
||||||
|
import com.mashibing.vo.ResultVO;
|
||||||
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zjw
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@RestControllerAdvice
|
||||||
|
public class AirExceptionHandler {
|
||||||
|
|
||||||
|
@ExceptionHandler(Exception.class)
|
||||||
|
public ResultVO ex(Exception ex){
|
||||||
|
return R.error(-1,ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue