3、验证码工具
@Test
public void hutoolCodeTest() throws FileNotFoundException {
/**、
-
1、创建一个验证码:
-
验证码 captcha['kæptʃə]
-
line:线条
-
参数说明
-
width:宽度
-
height:高度
-
codeCount:字符数量
-
lineCount:干扰线数量
*/
LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(200, 40, 4, 4);
//2.获得生成的验证码的真实码值
String code = lineCaptcha.getCode();
System.out.println(code);
//3.将验证码图片输出到D盘根目录下
lineCaptcha.write(new FileOutputStream(“D:/text.png”));
}
4、excel工具
- POI依赖导入,否则报错
You need to add dependency of '