解決問題:Error creating bean with name 'xxxController': Unsatisfied dependency expressed through field 'xxxService'


問題

這個問題是因為bean在注入service的時候失敗了,而service的實現類和mapper沒有關聯起來,mapper找不到

Error creating bean with name 'xxxController': Unsatisfied dependency expressed through field 'xxxService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxxServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'

解決辦法

在mapper接口上加一個注解@Mapper

@Mapper
public interface xxxProductMapper extends BaseMapper<SmmartProduct> {

}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



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