原因是mapper没有与listUser进行绑定,所以在使用listUser无法找到 解决方法是在yml文件中配置以下代码 mybatis: mapper-locations: classpath:mapper/*.xml