Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

生命无罪,健康万岁,大家好我是laity。

开发中问题梳理

报错1

Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

报错2

Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean._第1张图片

中文描述

无法启动网络服务器;嵌套异常是 org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean。

由于缺少 ServletWebServerFactory bean,无法启动 ServletWebServerApplicationContext。

本人解决方案

仅供参考

发生 网络异常报错说明本地服务提不起来,也检查了很久,最后在pom文件发现了端倪;

        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
            






        dependency>

通过取消移除内置的tomcat成功解决了该报错,希望对你有所帮助!!!

你可能感兴趣的:(平时开发遇到问题总结,java,spring,boot,开发语言,经验分享,maven)