Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bankServiceImpl': Unsatisfied dependency expressed through field 'bankDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.dao.bankDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
出现这个异常的原因是接口所在包和mapper.xml所在的包路径不相同
导致MapperScannerConfigurer为mapper创建实现类时出现错误
只要将接口所在包和mapper.xml所在的包路径改为一致即可