Caused by: java.lang.ClassNotFoundException: org.elasticsearch.transport.Netty3Plugin

前端 未结 2 957
余生分开走
余生分开走 2021-01-18 18:32

I\'m using Spring Boot 2.0.3 Release and i have problem while instantiating org.elasticsearch.client.Client. My code:

Client client = new PreBui         


        
2条回答
  •  走了就别回头了
    2021-01-18 19:25

    Not all dependencies are satisfied by only adding spring-boot-starter-data-elasticsearch.

    It's necessary to explicitly define all remaining dependencies:

        
            org.elasticsearch.client
            transport
            ${elasticsearch.version}
        
    
        
            org.elasticsearch.plugin
            transport-netty4-client
            ${elasticsearch.version}
        
    

    If you've declared a parent, most likely tag can be omitted.

提交回复
热议问题