还有一种错误我看没有人回答,我这里说一下:我的报错信息是:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'attentionInfoServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.syc.fishing.dao.AttentionInfoDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
没有找到dao层的类,
在启动类添加
@MapperScan("com.syc.fishing.dao")指定自己dao的包路径即可