Spring出現:No qualifying bean of type [com.exe.demo01.ch1.di.UseFunctionService] is defined的解決辦法

1.編寫功能類的Bean 2.使用功能類的Bean 3.配置類 4.運行 以上爲正確的代碼! 出現No qualifying bean of type [com.exe.demo01.ch1.di.UseFunctionService] is defined錯誤的原因如下: 1.在配置類中忘記掃描包,或掃描的包路徑寫錯 2.在運行的main方法中,.使用AnnotationConfigApplic
相關文章
相關標籤/搜索