登录Maven Spring Web项目

登录Maven Spring Web项目,spring,maven,log4j,Spring,Maven,Log4j,我有一个Maven Spring Web项目,我打算在其中包含log4j以用于日志记录。我已将log4j包含在pom.xml中,如下所示: <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> 在resources

我有一个Maven Spring Web项目,我打算在其中包含log4j以用于日志记录。我已将log4j包含在pom.xml中,如下所示:

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>
在resources文件夹中是log4j.properties

在am中,使用logger.debug生成日志。但它并没有被生成。我使用的是jdk1.7.0_75。有什么问题吗 ? jar文件版本是否存在依赖性


提前感谢。

这是spring boot项目吗?因为您需要排除logback依赖项,如果它作为首选项出现在这种情况下,那么将使用它。不,它不是spring引导项目