我的应用程序运行很少会失败并出现以下错误:
[main] ERROR o.s.boot.SpringApplication - Application run failed
java.util.NoSuchElementException: null
at java.base/java.util.ArrayDeque.removeFirst(Unknown Source)
at org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup.record(BufferingApplicationStartup.java:138)
at org.springframework.boot.context.metrics.buffering.BufferedStartupStep.end(BufferedStartupStep.java:92)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:614)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
Spring boot 版本是 2.4.1. 我有以下与 spring 相关的依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>