<dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.16</version> </dependency> 配置进去后External Library没有加入jar包,找到pom.xml里面的<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerArguments> <endorseddirs>${endorsed.dir}</endorseddirs> <bootclasspath>${java.home}\lib\rt.jar</bootclasspath> </compilerArguments> </configuration> </plugin>将上面的这段去掉即可
Intellij+Maven配置log4j
最新推荐文章于 2024-06-28 10:48:33 发布