0314提交

This commit is contained in:
yaoyuan1.chu
2020-03-14 16:43:12 +08:00
parent 20fb9598c3
commit e5251becd4
82 changed files with 69277 additions and 0 deletions
@@ -0,0 +1,34 @@
package com.yaoyuan.jiscuss.exception;
import com.yaoyuan.jiscuss.response.ResponseCode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 业务异常类,继承运行时异常,确保事务正常回滚
*
* @author NULL
* @since 2019-07-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class BaseException extends RuntimeException{
/**
*
*/
private static final long serialVersionUID = 1L;
private ResponseCode code;
public BaseException(ResponseCode code) {
this.code = code;
}
public BaseException(Throwable cause, ResponseCode code) {
super(cause);
this.code = code;
}
}