(这里写自定义目录标题)
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.ContainerBase
S
t
a
r
t
C
h
i
l
d
.
c
a
l
l
(
C
o
n
t
a
i
n
e
r
B
a
s
e
.
j
a
v
a
:
1559
)
a
t
o
r
g
.
a
p
a
c
h
e
.
c
a
t
a
l
i
n
a
.
c
o
r
e
.
C
o
n
t
a
i
n
e
r
B
a
s
e
StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase
StartChild.call(ContainerBase.java:1559)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run$$
c
a
p
t
u
r
e
(
F
u
t
u
r
e
T
a
s
k
.
j
a
v
a
:
266
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
F
u
t
u
r
e
T
a
s
k
.
r
u
n
(
F
u
t
u
r
e
T
a
s
k
.
j
a
v
a
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
r
u
n
W
o
r
k
e
r
(
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
1149
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor
capture(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.AutowiredAnnotationBeanPostProcessor
A
u
t
o
w
i
r
e
d
F
i
e
l
d
E
l
e
m
e
n
t
.
i
n
j
e
c
t
(
A
u
t
o
w
i
r
e
d
A
n
n
o
t
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r
.
j
a
v
a
:
573
)
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
a
n
n
o
t
a
t
i
o
n
.
I
n
j
e
c
t
i
o
n
M
e
t
a
d
a
t
a
.
i
n
j
e
c
t
(
I
n
j
e
c
t
i
o
n
M
e
t
a
d
a
t
a
.
j
a
v
a
:
88
)
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
a
n
n
o
t
a
t
i
o
n
.
A
u
t
o
w
i
r
e
d
A
n
n
o
t
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r
.
p
o
s
t
P
r
o
c
e
s
s
P
r
o
p
e
r
t
y
V
a
l
u
e
s
(
A
u
t
o
w
i
r
e
d
A
n
n
o
t
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r
.
j
a
v
a
:
331
)
.
.
.
23
m
o
r
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
t
o
r
y
.
d
o
R
e
s
o
l
v
e
D
e
p
e
n
d
e
n
c
y
(
D
e
f
a
u
l
t
L
i
s
t
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
1119
)
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
D
e
f
a
u
l
t
L
i
s
t
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
r
e
s
o
l
v
e
D
e
p
e
n
d
e
n
c
y
(
D
e
f
a
u
l
t
L
i
s
t
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
1014
)
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
a
n
n
o
t
a
t
i
o
n
.
A
u
t
o
w
i
r
e
d
A
n
n
o
t
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r
AutowiredFieldElement.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.AutowiredAnnotationBeanPostProcessor
AutowiredFieldElement.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文件是编写有误。