1.自定义Exception
package com.justin.exception;
/**
* @ClassName JustinException
* @Desc 自定义系统异常
* @Author justin.Sun
* @Date 2019/5/5 9:12
**/
public class JustinException extends RuntimeException {
public JustinException() {
}
public JustinException(String message) {
super(message);
}
public JustinException(String message, Throwable cause) {
super(message, cause);
}
public JustinException(Throwable cause) {
super(cause);
}
public JustinException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
2.定义系统请求状态返回码定义类