Log4j2 is working nicely with Spring Boot through the log4j2.xml
configuration file in the root classpath, exactly as the documentation states.
When try
I have the same problem in my project, besides log4j2.xml I also need other config files in the class path. Here is my 2 solutions that works:
Soluation 1 : Start spring boot application with org.springframework.boot.loader.JarLauncher
java -classpath SpringBootProject.jar;./config org.springframework.boot.loader.JarLauncher
Solution 2: Write a './config' class path entry in the MANIFEST.MF in the jar
maven-jar-plugin
./config/
org.springframework.boot
spring-boot-maven-plugin
1.5.3.RELEASE
repackage