1、添加elasticsearch客户端依赖
org.elasticsearch.client
transport
6.2.4
完整pom.xml
4.0.0
com.edu
elasticSearch
0.0.1-SNAPSHOT
jar
elasticSearch
http://maven.apache.org
UTF-8
1.8
1.8
org.elasticsearch.client
transport
6.2.4
junit
junit
4.2
test
View Code
2、添加log4j2.xml文件,elasticsearch客户端使用log4j2日志,不添加会运行会报错
log4j2.xml