Commit 1a7b87de by stylefeng

注释完善

parent 5982e45b
......@@ -8,10 +8,21 @@ package com.stylefeng.guns.rest.common.exception;
*/
public enum BizExceptionEnum {
AUTH_REQUEST_ERROR(400,"账号密码错误"),
/**
* token异常
*/
TOKEN_EXPIRED(700, "token过期"),
TOKEN_ERROR(700, "token验证失败"),
/**
* 签名异常
*/
SIGN_ERROR(700, "签名验证失败"),
TOKEN_EXPIRED(700, "token过期");
/**
* 其他
*/
AUTH_REQUEST_ERROR(400, "账号密码错误");
BizExceptionEnum(int code, String message) {
this.friendlyCode = code;
......
......@@ -47,9 +47,9 @@ public class WithSignMessageConverter extends FastJsonHttpMessageConverter4 {
String encrypt = MD5Util.encrypt(json + md5KeyFromToken);
if (encrypt.equals(baseTransferEntity.getSign())) {
System.out.println("签名校验成功");
System.out.println("签名校验成功!");
} else {
System.out.println("签名校验失败");
System.out.println("签名校验失败,数据被改动过!");
throw new BussinessException(BizExceptionEnum.SIGN_ERROR);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment