問題
這個問題是因為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> {
}