Im using Log4j for logging and i have config file in src/main/resources/log4j2-spring.xml
Running from IDE it works correctly but when i generate the JAR, opening the jar it’s gives me this exception:
Logging system failed to initialize using configuration from 'src/main/resources/log4j2-spring.xml'
java.io.FileNotFoundException: C:AAABBBCCCtargetsrcmainresourceslog4j2-spring.xml (The system can not find the specified path)
I don’t need to manually write or read this file, just want to make the JAR work so i don’t need to do anything like getResourcesAsStream()
How to make JAR to find this config file? maybe there’s some config for pom or something?