> 技术文档 > 后端启动问题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

        当你发现后端在服务器可以运行,在自己本地确报了这个错误报Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean的错误,可以采取我下面的几个方法,可以依次执行下面方法,也可以直接使用对应的方法。

一、运行清理和重新部署

        首先可以先maven clean 和 install

后端启动问题Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

二、重新加载maven

        如果还是不行,就需要清理maven,重新加载

后端启动问题Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

三、清理maven仓库和IDEA缓存

        如果再不行,删除对应本地的maven仓库,并且清除IDEA缓存

后端启动问题Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

四、启动类的pom下加入spring-boot-starter-web

        最终还不行,需要在bootstrap的pom下加入spring-boot-starter-web

  org.springframework.boot spring-boot-starter-web 

后端启动问题Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean