我将spring-boot父版本从1.2.5更新为1.5.9。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
更新版本后,spring-boot-starter-log4j
会显示以下错误消息。
Project build error: 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-log4j:jar is missing.
这是pom.xml中的spring-boot-starter-log4j
依赖性。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
</dependency>
帮我解决这个问题。
答案 0 :(得分:2)
尝试使用log4j2
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
要返回log4j,即log4j 1,您将需要进行一些自定义。