异常处理器升级到 0.0.4-SNAPSHOT。
This commit is contained in:
@@ -7,6 +7,7 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import xyz.zhouxy.plusone.constant.ErrorCodeConsts;
|
||||
import xyz.zhouxy.plusone.constant.RegexConsts;
|
||||
import xyz.zhouxy.plusone.domain.IValueObject;
|
||||
import xyz.zhouxy.plusone.exception.PlusoneException;
|
||||
@@ -36,7 +37,7 @@ public class Password implements IValueObject {
|
||||
}
|
||||
var salt = PasswordUtil.generateRandomSalt();
|
||||
if (salt == null) {
|
||||
throw new PlusoneException(9999999, "未知错误:生成随机盐失败");
|
||||
throw new PlusoneException(ErrorCodeConsts.DEFAULT_ERROR_CODE, "未知错误:生成随机盐失败");
|
||||
}
|
||||
this.saltVal = salt;
|
||||
this.passwordVal = PasswordUtil.hashPassword(password, salt);
|
||||
|
Reference in New Issue
Block a user