kaptcha配置java_kaptcha 配置

kaptcha配置java_kaptcha 配置问题所在:这一段配置,不要写在SpringMVC文件中,要写在Spring配置文件!no105,179,90red2508090code4宋体,楷体,微软雅黑异常信息:十二月19,20176:22:48下午org.apache.jasper.servlet.TldScannerscanJars信息:AtleastoneJARwasscannedforTLDsy…

大家好,又见面了,我是你们的朋友全栈君。

问题所在:

这一段配置,不要写在 SpringMVC 文件中,要写在 Spring 配置文件!

no

105,179,90

red

250

80

90

code

4

宋体,楷体,微软雅黑

异常信息:

十二月 19, 2017 6:22:48 下午 org.apache.jasper.servlet.TldScanner scanJars

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

十二月 19, 2017 6:22:48 下午 org.apache.catalina.core.ApplicationContext log

信息: No Spring WebApplicationInitializer types detected on classpath

十二月 19, 2017 6:22:48 下午 org.apache.catalina.core.ApplicationContext log

信息: Initializing Spring root WebApplicationContext

ERROR [main] – Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘captchaController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.google.code.kaptcha.Producer com.ht.controller.CaptchaController.captchaProducer; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.google.code.kaptcha.Producer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:434)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:671)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.google.code.kaptcha.Producer com.ht.controller.CaptchaController.captchaProducer; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.google.code.kaptcha.Producer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)

… 43 more

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.google.code.kaptcha.Producer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)

… 45 more

十二月 19, 2017 6:22:50 下午 org.apache.catalina.core.StandardContext listenerStart

严重: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘captchaController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.google.code.kaptcha.Producer com.ht.controller.CaptchaController.captchaProducer; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.google.code.kaptcha.Producer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:434)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:671)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.google.code.kaptcha.Producer com.ht.controller.CaptchaController.captchaProducer; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.google.code.kaptcha.Producer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)

… 43 more

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.google.code.kaptcha.Producer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)

… 45 more

十二月 19, 2017 6:22:50 下午 org.apache.catalina.core.StandardContext startInternal

严重: One or more listeners failed to start. Full details will be found in the appropriate container log file

十二月 19, 2017 6:22:50 下午 org.apache.catalina.core.StandardContext startInternal

严重: Context [/com] startup failed due to previous errors

十二月 19, 2017 6:22:50 下午 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

十二月 19, 2017 6:22:50 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc

警告: The web application [com] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

十二月 19, 2017 6:22:50 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads

警告: The web application [com] appears to have started a thread named [Abandoned connection 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)

十二月 19, 2017 6:22:50 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler [“http-nio-8080”]

十二月 19, 2017 6:22:50 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler [“ajp-nio-8009”]

十二月 19, 2017 6:22:50 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 10794 ms

                                                                                              no                          105,179,90                          red                          250                          80                          90                          code                          4                          宋体,楷体,微软雅黑                                                                     

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/150369.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号