idea springboot項目啓動要求加bean

啓動報錯 XXXcontroller required a bean of type ‘XXXX.interface’ that could not be found.

  • 解決辦法,在啓動類上掃描包。
  • @SpringBootApplication(exclude = { HibernateJpaAutoConfiguration.class }, scanBasePackages = “com.wufj”)

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章