java签名算法阻止 设置_coding++:java-自定义签名+拦截器

packagecom.mlq.exception;importcom.mlq.tools.ErrorPrintUtils;public abstract class AbstractException extendsRuntimeException {private static final long serialVersionUID = -5992753399315247713L;privateString errorCode;privateString errorMsg;privateString stackTraceMsg;privateString level;privateString messageID;private boolean sendMsg = true;publicAbstractException(String code, String message, String... level) {super(code + "|" +message);this.handleExceptionMessage(code, message, code + "|" +message);

}publicAbstractException(String code, String message, Throwable th) {super(code + "|" +message, th);this.handleExceptionMessage(code, message, ErrorPrintUtils.printStackTrace(th));

}public final voidhandleExceptionMessage(String code, String message, String stackTraceMsg) {this.errorCode =code;this.errorMsg =message;this.stackTraceMsg =stackTraceMsg;

}publicAbstractException(Throwable cause) {super(cause);

AbstractException.ErrorDesc errorDesc= this.getErrorDesc(cause);if (errorDesc != null) {this.errorCode =errorDesc.errorCode;this.errorMsg =errorDesc.errorMsg;

}

}publicAbstractException(String message) {super(message);

}public abstractAbstractException.ErrorDesc getErrorDesc(Throwable var1);publicString getErrorCode() {return this.errorCode;

}publicString getErrorMsg() {return this.errorMsg;

}public voidsetErrorCode(String errorCode) {this.errorCode =errorCode;

}public voidsetErrorMsg(String errorMsg) {this.errorMsg =errorMsg;

}publicString getStackTraceMsg() {return this.stackTraceMsg;

}public voidsetStackTraceMsg(String stackTraceMsg) {this.stackTraceMsg =stackTraceMsg;

}publicString getLevel() {return this.level;

}public voidsetLevel(String level) {this.level =level;

}publicString getMessageID() {return this.messageID;

}public voidsetMessageID(String messageID) {this.messageID =messageID;

}public booleanisSendMsg() {return this.sendMsg;

}public void setSendMsg(booleansendMsg) {this.sendMsg =sendMsg;

}public static classErrorDesc {publicString errorCode;publicString errorMsg;publicErrorDesc(String errorCode, String errorMsg) {this.errorCode =errorCode;this.errorMsg =errorMsg;

}

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值