(这里写自定义目录标题)
org.apache.catalina.core.StandardContext listenerStart严重:将上下文初始化事件发送到类org.springframework.web.context.ContextLoaderListener的侦听器实例的异常
org.springframework.beans.factory.BeanCreationException:创建名为’brandServiceImpl’的豆时出错:注入自动连接的依赖项失败; 嵌套异常是org.springframework.beans.factory.BeanCreationException:无法自动装配字段:私人cn.yl.mapper.TbBrandMapper cn.yl.sellergoods.service.impl.BrandServiceImpl.tbBrandMapper; 嵌套异常是org.springframework.beans.factory.NoSuchBeanDefinitionException:找不到类型[cn.yl.mapper.TbBrandMapper]的限定豆用于依赖:预期至少有1种豆有资格作为此依赖项的自动装配候选在.ormi.springframework上,@ org.springframework.beans.factory.annotation.Autowired(所需=真)}在org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)在org。 springframework .beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
在Org.springframework的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482).bean.factory。 support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:306)在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1559)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1559)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run$$capture(FutureTask.java:266)atjava.util.concurrent.FutureTask.run(FutureTask.java)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)atjava.util.concurrent.ThreadPoolExecutorcapture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutorcapture(FutureTask.java:266)atjava.util.concurrent.FutureTask.run(FutureTask.java)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.yl.mapper.TbBrandMapper cn.yl.sellergoods.service.impl.BrandServiceImpl.tbBrandMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.yl.mapper.TbBrandMapper] 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.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)...23moreCausedby:org.springframework.beans.factory.NoSuchBeanDefinitionException:Noqualifyingbeanoftype[cn.yl.mapper.TbBrandMapper]foundfordependency:expectedatleast1beanwhichqualifiesasautowirecandidateforthisdependency.Dependencyannotations:@org.springframework.beans.factory.annotation.Autowired(required=true)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 23 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.yl.mapper.TbBrandMapper] 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:1373)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)...23moreCausedby:org.springframework.beans.factory.NoSuchBeanDefinitionException:Noqualifyingbeanoftype[cn.yl.mapper.TbBrandMapper]foundfordependency:expectedatleast1beanwhichqualifiesasautowirecandidateforthisdependency.Dependencyannotations:@org.springframework.beans.factory.annotation.Autowired(required=true)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
… 25 more
Apr 10, 2019 2:41:08 PM org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
Apr 10, 2019 2:41:08 PM org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
Apr 10, 2019 2:41:08 PM org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
Apr 10, 2019 2:41:08 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] 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.
Apr 10, 2019 2:41:08 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Apr 10, 2019 2:41:08 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Apr 10, 2019 2:41:08 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Apr 10, 2019 2:41:08 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] 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.
Apr 10, 2019 2:41:08 PM org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“http-bio-9001”]
解决方法:
- 缺少dao层的扫描文件或者是src/main/resources/spring/applicationContext-dao.xml中路径是否写错了。
<property name="basePackage" value="xx.xx.mapper" />
- mybatis-spring版本1.3.0和 mybatis 3.4.0 以及spring 4.2.5.RELEASE版本搭配
<mybatis.version>3.4.0</mybatis.version>
<!--<mybatis.version>3.2.8</mybatis.version>-->
<mybatis.spring.version>1.3.0</mybatis.spring.version>
<!--<mybatis 。春天。版本> 1.2 .2 < / mybatis 。春天。版本> - > ```
3. src / main / resources / spring / applicationContext-service.xml该文件的路径是否有变成是自己的,端口号还有ip是否有误。
4.查看自己的父工程中的pom文件是编写有误。