Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/z28126308/article/details/80320199

Spring Boot启动异常Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

 原因:

1.百度到的正常答案缺少以下注释(但我不正常的)

@SpringBootApplication
2.将Maven中的依赖中的spring-boot-starter-webflux改为spring-boot-starter-web(之前试了下webflux忘了改回来,官方也有说不能与starter-web并存)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章