public class ServiceRuntimeException extends RuntimeException {
private static final long serialVersionUID = -7610488146748705981L;
/**
* 错误代码
*/
@Getter
private transient ResultCode resultCode;
/**
* 直接使用errorCode中的消息
* @param resultCode 错误代码
*/
public ServiceRuntimeException(ResultCode resultCode) {
super(resultCode.getMessage());
this.resultCode = resultCo
自定义异常消息装载类
最新推荐文章于 2022-01-14 14:12:27 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)