错误描述:A query was run and no Result Maps were found for the Mapped Statement 'com.atguigu.mybatis.mapper.UserMapper.getUserById'. It's likely that neither a Result Type nor a Result Map was specified.
翻译:运行了一个查询,但没有找到映射语句“com.atguigu.mybatis.mapper.UserMapper.getUserById”的结果映射。 可能既未指定“结果类型(Result Type)”,也未指定“结果映射(Result Map)”。
结果显而易见:是mapper映射文件对应sql标签缺少返回值类型
修改后:
运行结果: