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即可。


目录
相关文章
|
7月前
|
Java API Spring
Gateway网关报错Unable to start ServletWebServerApplicationContext due to missing ServletWebServer
Gateway网关报错Unable to start ServletWebServerApplicationContext due to missing ServletWebServer
121 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
|
8月前
|
Java Spring
【Java】Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean
【Java】Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean
99 0
|
1月前
|
安全 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
31 0
|
1月前
|
机器学习/深度学习 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
86 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.
|
关系型数据库 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
报错解决:Reason: Failed to determine a suitable driver class
报错解决:Reason: Failed to determine a suitable driver class
2481 0
报错解决:Reason: Failed to determine a suitable driver class
|
Android开发
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
358 0
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
|
并行计算 PyTorch 算法框架/工具
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决