打包运行出错Field defaultKaptcha in com.course.business.
来源:14-3 前后端多环境配置

摸鱼师
2021-06-13
05.838 ?[34mINFO ?[0;39m ?[34mo.s.b.w.e.t.TomcatWebServer :92 ?[0;39m ?[32m ?[0;39m Tomcat initialized with port(s): 9002 (http)
05.848 ?[34mINFO ?[0;39m ?[34mo.a.c.http11.Http11NioProtocol:173 ?[0;39m ?[32m ?[0;39m Initializing ProtocolHandler ["http-nio-9002"]
05.848 ?[34mINFO ?[0;39m ?[34mo.a.c.core.StandardService :173 ?[0;39m ?[32m ?[0;39m Starting service [Tomcat]
05.849 ?[34mINFO ?[0;39m ?[34mo.a.c.core.StandardEngine :173 ?[0;39m ?[32m ?[0;39m Starting Servlet engine: [Apache Tomcat/9.0.29]
05.905 ?[34mINFO ?[0;39m ?[34mo.a.c.c.C.[.[.[/business] :173 ?[0;39m ?[32m ?[0;39m Initializing Spring embedded WebApplicationContext
05.905 ?[34mINFO ?[0;39m ?[34mo.s.web.context.ContextLoader :284 ?[0;39m ?[32m ?[0;39m Root WebApplicationContext: initialization completed in 1526 ms
06.268 ?[31mWARN ?[0;39m ?[34mo.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext:558 ?[0;39m ?[32m ?[0;39m Exception encountered during context initialization - canc
elling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kaptchaController': Unsatisfied dependency expressed through fi
eld 'defaultKaptcha'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.google.code.kaptcha.impl.DefaultKaptcha' avai
lable: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=getWebKaptcha), @org.sprin
gframework.beans.factory.annotation.Autowired(required=true)}
06.284 ?[34mINFO ?[0;39m ?[34mo.a.c.core.StandardService :173 ?[0;39m ?[32m ?[0;39m Stopping service [Tomcat]
06.291 ?[31mWARN ?[0;39m ?[34mo.a.c.l.WebappClassLoaderBase :173 ?[0;39m ?[32m ?[0;39m The web application [business] appears to have started a thread named [Abandoned connectio
n cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
06.300 ?[34mINFO ?[0;39m ?[34mo.s.b.a.l.ConditionEvaluationReportLoggingListener:136 ?[0;39m ?[32m ?[0;39m
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
06.445 ?[1;31mERROR?[0;39m ?[34mo.s.b.d.LoggingFailureAnalysisReporter:40 ?[0;39m ?[32m ?[0;39m
***************************
APPLICATION FAILED TO START
***************************
Description:
Field defaultKaptcha in com.course.business.controller.web.KaptchaController required a bean of type 'com.google.code.kaptcha.impl.DefaultKaptcha' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Qualifier(value=getWebKaptcha)
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.google.code.kaptcha.impl.DefaultKaptcha' in your configuration.
这里不单单是business模块 其他模块也是出现问题
写回答
1回答
-
这个好了吗?有没有先打包一下server模块
00
相似问题