在pom.xml中更新弹簧启动版本时会出现错误



i我将弹簧启动父版本从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>

帮助我解决这个问题。

尝试使用log4j2

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>

要返回log4j,即log4j 1,您必须进行一些自定义。

最新更新