单项选择题Mybatis中的()元素用于数组和集合的循环遍历。

A.<if>
B.<when>
C.<where>
D.<foreach>


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题<foreach>元素的()属性配置的是循环中当前的元素。

A.index
B.item
C.collection
D.separator

3.单项选择题拼接SQL语句时,可以用()元素自动删除SQL语句条件部分的多余的"AND"或"OR"。

A.<if>
B.<choose>
C.<otherwise>
D.<where>

4.单项选择题MyBatis的动态SQL中,相当于Java的switch...case...default语句的是()。

A.<choose>、<when>、<otherwise>元素组合
B.<select>、<where>、<otherwise>元素组合
C.<choose>、<when>、<trim>元素组合
D.<if>、<when>、<otherwise>元素组合

5.单项选择题动态SQL中,判断username不是空且不是空串的写法,正确的是()。

A.<if "username!=null and username!=’’">
B.<if test="username!=null or username!=’’">
C.<if test="username!=null and username!=’’">
D.<trim test="username!=null and username!=’’">

7.单项选择题()的主要作用是定义映射规则、级联的更新以及定义类型转化器等。

A.<resultMap>元素
B.<enviroment>
C.<transactionManager>
D.<databaseProvider>

9.单项选择题<select>元素中表示传入SQL语句的参数类的全限定名或者别名的属性是()。

A.resultMap
B.resultType
C.parameterType
D.statementType

10.单项选择题下列不是<mappers>元素引入映射文件方式的是()。

A.使用构造方法引入
B.使用类路径引入
C.使用本地文件路径引入
D.使用接口类引入