https://blog.csdn.net/qq_36551991/article/details/106566308
今天創建一個SpringBoot工程,啟動時報了以下錯誤
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry’ available
從字面來看是因為沒有名為’org.springframework.context.annotation.ConfigurationClassPostProcessor '的bean。importRegistry”可用
原因
百度了下,說是因為Spring Boot應用中某些組件沒有默認配置項,如數據庫配置。
想了下,我添加了mybatis的依賴,但沒有在配置文件寫數據庫配置。試了下把這個依賴去掉,運行成功。當然,在配置文件中加上數據庫配置也可以
————————————————
版權聲明:本文為CSDN博主「way_more」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/qq_36551991/article/details/106566308