首页 试题广场 > 试题详情
多选题

【C017118】在MyBatis中,对以下代码片段描述正确的选项是( )。
dao接口:
public List findById(String id);
Mapper:
<select id="findById" resultType="user" parameterType="map" >
???????? select * from sys_users
???????? <where>
???????????? <if test="id != null">
???????????????? and id=#{id}
???????????? </if>
???????? </where>
</select>

  • A.以上代码执行报错:因为resultType的参数“user”未定义
  • B.以上代码执行报错:因为resultType的参数“user”与接口方法的返回值类型不匹配
  • C.以上代码执行报错:因为编译后where后面紧接着and
  • D.以上代码执行报错:因为parameterType的参数“map”与传入值不匹配
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 6个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部