Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean解决方案N种

简介: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean解决方案N种

Spring Boot启动应用总是报错如下:


Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean


与“Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean”如出一辙。


不是技术论坛中大家常说的应用入口类缺少@SpringBootApplication标注,或者是Spring bean缺少@EnableAutoConfiguration标注等问题。


是因为默认使用的嵌入式Tomcat容器无法启动。


解决的办法来了


删除Maven本地库中有错的tomcat-embed-core,再次构建下载新的tomcat-embed-core,构建错误消失,成功构建完成。

把嵌入的tomcat注释一下就可以了

我就是因为排除了嵌入式tomcat,指定本地的tomcat即可。


目录
相关文章
|
缓存 PHP
Composer 报错 Error while processing content unencoding: Unknown failure within ...
Composer 报错 Error while processing content unencoding: Unknown failure within ...
210 0
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
|
Java API Spring
Gateway网关报错Unable to start ServletWebServerApplicationContext due to missing ServletWebServer
Gateway网关报错Unable to start ServletWebServerApplicationContext due to missing ServletWebServer
233 0
|
Java Spring
【Java】Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean
【Java】Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean
175 0
|
6月前
|
安全 Java 应用服务中间件
A configuration error occurred during startup.Please verify the preference field with the prompt: To
A configuration error occurred during startup.Please verify the preference field with the prompt: To
|
6月前
|
机器学习/深度学习 Java Android开发
记录一个Flutter运行的异常FAILURE: Build failed with an exception. What went wrong: A problem occurred config
记录一个Flutter运行的异常FAILURE: Build failed with an exception. What went wrong: A problem occurred config
226 0
|
Java 应用服务中间件
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
|
网络协议 关系型数据库 Linux
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
182 0
|
关系型数据库 MySQL Java
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service