问答详情
源自:6-1 SpringBoot集成ElasticSearch

我按照老师的做法,为什么报错,谢谢

***************************

APPLICATION FAILED TO START

***************************


Description:


Field client in test.Application required a bean of type 'org.elasticsearch.client.transport.TransportClient' that could not be found.



Action:


Consider defining a bean of type 'org.elasticsearch.client.transport.TransportClient' in your configuration.


提问者:慕粉5592549 2018-06-12 08:50

个回答

  • 李霄何
    2018-11-08 17:09:31

    没加bean注解

  • weibo_sJ书桀
    2018-06-12 22:07:16

    可以尝试:1.确认es服务已有启动。2.确认安装的es和引入的es的jar包是同一版本。3.@Configuration注解的类中transportClient方法有加@bean注解