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並存)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章