public abstract class AbstractGenerator extends Object implements CodeGenerator
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseStr
基础字符集合,用于随机获取字符串的字符集合
|
protected int |
length
验证码长度
|
| Constructor and Description |
|---|
AbstractGenerator(int count)
构造,使用字母+数字做为基础
|
AbstractGenerator(String baseStr,
int length)
构造
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLength()
获取长度验证码
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerate, verifyprotected final String baseStr
protected final int length
public AbstractGenerator(int count)
count - 生成验证码长度public AbstractGenerator(String baseStr, int length)
baseStr - 基础字符集合,用于随机获取字符串的字符集合length - 生成验证码长度Copyright © 2025. All rights reserved.