原文:SpringBoot中service注入失敗(A component required a bean of type 'XXService' that could not found)

先寫了JUnit,發現啟動不了,注釋掉有問題的service也不可以。可能是因為spring開始時會加載所有service吧。 按照網友們的說法,一般需要檢查: .入口類有沒有寫MapperScan 我寫了,沒問題: MapperScan basePackages com.example.demo.mapper .該service對應的dao接口上沒寫 Mapper 我寫了,沒問題: . Serv ...

2019-09-11 09:46 0 4573 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM