Which is the best place to keep log4j.xml
in eclipse folders? I keep it under \\build\\classes
however every time when I clean project, log4j.xml
gets removed.
So what is the standard and best place to keep log4j.xml
?
In a Maven-standard build config, you put it in src/main/resources
, but anywhere in the root of the classpath is fine, eg src/main/java
, src/java
, whatever. Just don't put it in a directory containing generated artifacts (like build/classes
), since it'll be deleted every time you blink.
\\build\\classes
是项目的目标文件夹,您应该将log4j.xml
放在项目的源文件夹中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.