parent
7d5096823d
commit
b407484298
@ -1,4 +1,4 @@
|
||||
package com.mashibing.constant;
|
||||
package com.mashibing.common.constant;
|
||||
|
||||
/**
|
||||
* 缓存模块中的各种前缀
|
@ -1,4 +1,4 @@
|
||||
package com.mashibing.enums;
|
||||
package com.mashibing.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.mashibing.exceptiion;
|
||||
package com.mashibing.common.exception;
|
||||
|
||||
import com.mashibing.enums.ExceptionEnums;
|
||||
import com.mashibing.common.enums.ExceptionEnums;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
@ -1,22 +1,23 @@
|
||||
package com.mashibing.advice;
|
||||
package com.mashibing.api.advice;
|
||||
|
||||
import com.mashibing.api.util.R;
|
||||
import com.mashibing.api.vo.ResultVO;
|
||||
import com.mashibing.exceptiion.ApiException;
|
||||
import com.mashibing.common.exception.ApiException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
/**
|
||||
* @author kezhen
|
||||
* @date 2022/12/29
|
||||
* @author zjw
|
||||
* @description
|
||||
*/
|
||||
@RestControllerAdvice
|
||||
public class ApiExceptionHander {
|
||||
public class ApiExceptionHandler{
|
||||
|
||||
@ExceptionHandler(ApiException.class)
|
||||
public ResultVO apiException(ApiException ex){
|
||||
System.out.println("exception.getCode() = " + ex.getCode());
|
||||
System.out.println("ApiExceptionHandler.apiException");
|
||||
return R.error(ex);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in new issue