spring - Spring Boot 无法启动 Web 服务器
问题描述
我有一个不寻常的问题,我们有一个 Spring Boot 项目,该项目适用于除我之外的每个人的开发环境。我得到的错误是:
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157) ~[spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
我们已经尝试从这里创建一个 vanilla web 项目:https ://start.spring.io/并尝试以相同的错误启动生成的项目。
我看不到这是项目的配置错误,因为
- 它是由 spring 从 spring 网站配置的
- 它适用于除我之外的其他所有人的 IDE
我尝试了具有相同 JDK (jdk1.8.0_121) 的各种版本的 STS IDE 我已将 STS IDE 更新到 3.9.7,但它仍然失败 - 这是与同事相同的配置。
这是应用程序:
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
解决方案
推荐阅读
- java - 不可变类的存储区域
- php - PHP IF 语句要使用 Else If 还是另一个 IF 语句?
- python-3.x - 如何使用 python 运行管理命令提示符?
- dask - dask read_parquet 内存不足
- spring-boot - Spring Boot JPA find, filter
- javascript - 如何在VSC中快速找到TS函数的来源而不需要手动通过node_modules?
- ios - SwiftUI 中的 $varName 和 _varName 有什么区别
- python - 腐蚀数组的几层
- tensorflow - tf.estimator 服务功能失败
- ajax - 有没有办法在 Primefaces 数据表中捕捉 livescroll 事件?