org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'esSearchUtil': Unsatisfied dependency expres through field 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'client' defined in class path resource [com/miju/common/configuration/EsConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.RestHighLevelClient]: Factory method 'client' threw exception; nested exception is java.lang.NullPointerException

springBoot启动错误?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
6条回答 默认 最新
- KiterCher 2021-02-01 16:26关注
你这报错已经很明显了呀。EsConfig line:19 这行报空指针,你断点看看哪个值是空的,然后做个判断就行了呀
EsConfig.client(EsConfig.java:19)
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决评论 打赏 举报无用 1