IDEA 报错Error creating bean with name ‘elasticsearchClient’,
问题描述:
由于IDEA需要elasticsearch的版本为6.8.7,于是就安装了6.8.7版本的elasticsearch,结果报错(可以先查看自己安装的版本是否与IDEA中一致)。

解决方案:
在你使用到elasticsearch的微服务的启动类中进行system.setProperty配置:
@SpringBootApplication
@MapperScan(basePackages = "com.imooc.article.mapper")
@ComponentScan(

本文介绍了当IDEA在启动时遇到'Error creating bean with name 'elasticsearchClient''的问题及其解决方案。问题起因可能为IDEA所要求的Elasticsearch版本与实际安装版本不匹配。解决办法是在使用Elasticsearch的微服务启动类中设置system.setProperty,确保版本一致性。
最低0.47元/天 解锁文章
1398





