在进行springboot项目的时候,浏览器页面显示405报错
idea下显示
org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.li.Mapper.usernameMapper.queryByName'. It's likely that neither a Result Type nor a Result Map was specified.(二)解决问题
然后百度翻译进行翻译,结果如下
已运行查询,但未找到映射语句“com.li.Mapper.usernameMapper.queryByName”的结果映射。 很可能既没有指定结果类型,也没有指定结果映射。
于是找到了
内容为:
select password from name where username=#{username}
结合上面的翻译仔细观看,原来是 select sql 中缺少resultType
再次运行测试,即可成功!!!
(三)分析问题- 转



