前置环境:Java maven工程 log4j配置 添加依赖 <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId>