一.自定义自己的异常类MyException.javapublic class MyException extends RuntimeException { private int code; public MyException( int code, String message ) { super(message); this.code = c...
摘要由CSDN通过智能技术生成
一.自定义自己的异常类MyException.java
public class MyException extends RuntimeException {
private int code;
public MyException( int code, String message ) {
super(message);
this.code = code;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
public class Result implements Serializable {
private int code;
private String msg;
private Object data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg