@Service public class VerifyCodeServiceImpl extends VerifyCodeConfig implements VerifyCodeService
| 构造器和说明 |
|---|
VerifyCodeServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
Color |
getBgColor() |
String |
getCodes() |
String[] |
getFontNames() |
int |
getHeight() |
BufferedImage |
getImage()
获得验证码图片
|
Random |
getRandom() |
String |
getStrText() |
int |
getWidth() |
void |
output(BufferedImage image,
OutputStream out)
保存图片文件
|
void |
setStrText(String strText) |
int |
verify(String userCode)
验证用户输入的验证码
|
public String strText
@FuncVerification(version="1.0.0", status=Unverified, date="2020/5/4 15:39") public BufferedImage getImage()
getImage 在接口中 VerifyCodeService@FuncVerification(version="1.0.0", status=Unverified, date="2020/5/4 15:47") public void output(BufferedImage image, OutputStream out) throws IOException
output 在接口中 VerifyCodeServiceimage - 传入绘制的图片out - 传入带有保存位置的输出流IOException - 可能存在保存失败的情况@FuncVerification(version="1.0.0", status=Unverified, date="2020/5/4 16:17") public int verify(String userCode)
verify 在接口中 VerifyCodeServiceuserCode - 传入用户输入的验证码返回结果可能情况:
-1 用户未输入
0 用户输入错误
1 用户输入正确
public int getWidth()
public int getHeight()
public Random getRandom()
public String[] getFontNames()
public String getCodes()
public Color getBgColor()
public String getStrText()
getStrText 在接口中 VerifyCodeServicepublic void setStrText(String strText)
This documentation was released into the public domain.