1）引入es的RestHighLevelClient依赖：<dependency> <groupId>org.elasticsearch.client</gr...