Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat解决办法,已解决。
其实就是父工程springboot的版本与子工程web依赖不一致,降低父工程的springboot版本就行了
父工程依赖:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
子工程依赖:
<!--web依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.5.2</version>
</dependency>
博客介绍了在SpringBoot项目中遇到的无法启动web服务器的问题,原因是父工程与子工程的SpringBoot版本不一致。通过调整父工程的SpringBoot版本到与子工程相同,成功解决了WebServerException。这是一个关于版本冲突和依赖管理的解决方案。

1564

被折叠的 条评论
为什么被折叠?



