报错:
Error creating bean with name ‘com.practice.mybatisplus.MybatisplusApplicationTests’: Unsatisfied dependency expressed through field ‘userMapper’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.practice.mybatisplus.mapper.UserMapper’ available
原因:mapper没有被容器扫描到
解决方法:在启动类上加mapper的扫描
@MapperScan("mapper的包名“)