Jerry9798: Producer不是接口吗,怎么不实现就注入了,这样直接项目都报错,还是要实现一下的 [code=java] @Component public class KaptchaProducer implements Producer { private final DefaultKaptcha defaultKaptcha; public KaptchaProducer() { Properties properties = new Properties(); properties.setProperty("kaptcha.image.width", "100"); properties.setProperty("kaptcha.image.height", "40"); properties.setProperty("kaptcha.textproducer.char.length", "4"); properties.setProperty("kaptcha.textproducer.char.string", "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); // 设置背景颜色为白色 properties.setProperty("kaptcha.background.clear.from", "white"); properties.setProperty("kaptcha.background.clear.to", "white"); // 设置字体大小 properties.setProperty("kaptcha.textproducer.font.size", "30"); // 移除噪点 properties.setProperty("kaptcha.noise.impl", "com.google.code.kaptcha.impl.NoNoise"); // 增加边框 properties.setPro [/code]
R语言编程
springboot vue 实现验证码