missing|missing ServletWebServerFactory bean
点击了报错行,在报错行打了个断点,发现是没取到这个bean。
启动了另一个web项目,同样一个地方打了断点,发现取到的是tomcatServletWebServerFactory。
判断到没有引入tomcat即web类的依赖。
不过看pom是引入了。发现boot-web依赖下面有个排除。去掉之后报错依旧。
进行重新clean pom,重新编译启动
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:206) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
... 8 more
【missing|missing ServletWebServerFactory bean】
推荐阅读
- mac升级之(xcrun:|mac升级之:xcrun: error: invalid active developer path, missing xcrun)
- L3U1P2|L3U1P2 Dialogue(Missing the flight)
- codility|codility 之 MissingInteger
- topcoder|Topcoder SRM 661 Div1 Easy: MissingLCM
- Xcode|Xcode 8 is missing from working copy 解决方法
- Possible missing firmware
- Vue前端开发报错提示“npm ERR! missing script: dev”的解决方案
- npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@a
- error|error C2146: syntax error : missing ';' before identifier 'PVOID64'
- [WARNING]|[WARNING] Missing POM for com.adobe.blazeds:blazeds-core:jar:4.0.0.14931