生成验证码配置 @author Mark sunlightcs@gmail.com
| 15 | * @author Mark sunlightcs@gmail.com |
| 16 | */ |
| 17 | @Configuration |
| 18 | public class KaptchaConfig { |
| 19 | |
| 20 | @Bean |
| 21 | public DefaultKaptcha producer() { |
| 22 | Properties properties = new Properties(); |
| 23 | properties.put("kaptcha.border", "no"); |
| 24 | properties.put("kaptcha.textproducer.font.color", "black"); |
| 25 | properties.put("kaptcha.textproducer.char.space", "5"); |
| 26 | properties.put("kaptcha.textproducer.font.names", "Arial,Courier,cmr10,宋体,楷体,微软雅黑"); |
| 27 | Config config = new Config(properties); |
| 28 | DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); |
| 29 | defaultKaptcha.setConfig(config); |
| 30 | return defaultKaptcha; |
| 31 | } |
| 32 | } |
nothing calls this directly
no outgoing calls
no test coverage detected