有大神知道这是怎么回事吗?刚开始还好好的,后来突然报这个错,太头大了,救救我吧呜呜
elasticsearch结合springboot进行单元测试时报错:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2020-05-17 18:25:33.502 ERROR 17960 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘requestMappingHandlerAdapter’ defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration
E
n
a
b
l
e
W
e
b
M
v
c
C
o
n
f
i
g
u
r
a
t
i
o
n
.
c
l
a
s
s
]
:
B
e
a
n
i
n
s
t
a
n
t
i
a
t
i
o
n
v
i
a
f
a
c
t
o
r
y
m
e
t
h
o
d
f
a
i
l
e
d
;
n
e
s
t
e
d
e
x
c
e
p
t
i
o
n
i
s
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
B
e
a
n
I
n
s
t
a
n
t
i
a
t
i
o
n
E
x
c
e
p
t
i
o
n
:
F
a
i
l
e
d
t
o
i
n
s
t
a
n
t
i
a
t
e
[
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
w
e
b
.
s
e
r
v
l
e
t
.
m
v
c
.
m
e
t
h
o
d
.
a
n
n
o
t
a
t
i
o
n
.
R
e
q
u
e
s
t
M
a
p
p
i
n
g
H
a
n
d
l
e
r
A
d
a
p
t
e
r
]
:
F
a
c
t
o
r
y
m
e
t
h
o
d
′
r
e
q
u
e
s
t
M
a
p
p
i
n
g
H
a
n
d
l
e
r
A
d
a
p
t
e
r
′
t
h
r
e
w
e
x
c
e
p
t
i
o
n
;
n
e
s
t
e
d
e
x
c
e
p
t
i
o
n
i
s
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
.
B
e
a
n
C
r
e
a
t
i
o
n
E
x
c
e
p
t
i
o
n
:
E
r
r
o
r
c
r
e
a
t
i
n
g
b
e
a
n
w
i
t
h
n
a
m
e
′
m
v
c
C
o
n
v
e
r
s
i
o
n
S
e
r
v
i
c
e
′
d
e
f
i
n
e
d
i
n
c
l
a
s
s
p
a
t
h
r
e
s
o
u
r
c
e
[
o
r
g
/
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
/
b
o
o
t
/
a
u
t
o
c
o
n
f
i
g
u
r
e
/
w
e
b
/
s
e
r
v
l
e
t
/
W
e
b
M
v
c
A
u
t
o
C
o
n
f
i
g
u
r
a
t
i
o
n
EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration
EnableWebMvcConfiguration.class]:Beaninstantiationviafactorymethodfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]:Factorymethod′requestMappingHandlerAdapter′threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname′mvcConversionService′definedinclasspathresource[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationEnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method ‘mvcConversionService’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘goodsRepository’: Cannot resolve reference to bean ‘elasticsearchTemplate’ while setting bean property ‘elasticsearchOperations’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘elasticsearchTemplate’ defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘elasticsearchTemplate’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘elasticsearchClient’ defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method ‘elasticsearchClient’ threw exception; nested exception is java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/elasticsearch/common/transport/InetSocketTransportAddress
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]