Springboot with Elasticsearch 5.0 client - Log4j2 errors
Please add dependencies
- log4j-api
- log4j-core
- log4j-slf4j-impl
Currently the latest version is 2.8.
You can remove the log4j-over-slf4j dependency, this is for the old Log4j 1.2.
What if you have your dependency
as this with the version
:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> <version>1.2.3.RELEASE</version></dependency>
I am using spring boot with ES client.Try the following dependencies
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--elastic search client--> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>5.0.1</version> </dependency> <!--log 4j--> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.6.2</version> </dependency> </dependencies>
Also in the properties in your pom.xml add the following
<properties> <elasticsearch.version>5.0.0</elasticsearch.version></properties>