public abstract class AbstractStrategy extends Object implements CodeStrategy
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseStr
基础字符集合,用于随机获取字符串的字符集合
|
protected int |
length
验证码长度
|
| Constructor and Description |
|---|
AbstractStrategy(int count)
构造,使用字母+数字做为基础
|
AbstractStrategy(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 AbstractStrategy(int count)
count - 生成验证码长度public AbstractStrategy(String baseStr, int length)
baseStr - 基础字符集合,用于随机获取字符串的字符集合length - 生成验证码长度Copyright © 2020. All rights reserved.