Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer

x33g5p2x  于2021-12-29 转载在 Spring  
字(0.9k)|赞(0)|评价(0)|浏览(140)

【现象】

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:210) ~[spring-boot-2.6.2.jar:2.6.2]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.6.2.jar:2.6.2]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160) ~[spring-boot-2.6.2.jar:2.6.2]

... 8 common frames omitted

【解决方法】

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
</dependency>

相关文章

微信公众号

最新文章

更多