参考:解决使用Kaptcha报组件缺失的问题_达希_的博客-CSDN博客
**************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'com.google.code.kaptcha.Producer' that could not be found.
Action:
Consider defining a bean of type 'com.google.code.kaptcha.Producer' in your configuration.
把这个文件配置好:
@Configuration
public class KaptchaConfig {
@Bean
public DefaultKaptcha producer() {
Properties properties = new Properties();
properties.put("xxxx", "xxx");
...
Config config = new Config(properties);
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
defaultKaptcha.setConfig(config);
return defaultKaptcha;
}
}