mybatis小东西记录

mapper.xml里 如果返回list,resultType=""里直接写list返回的类型。

config.xml里<typeAliases>必须放在environments上,properties下,不然报错,不过有人说写在上面报错下面不报错,搞不懂。

dtd没有提示在eclipse里配置

传入多参数方式只有两种
1,传入map,2传入javabean

在配置xml时候使用<,>号会报错,可以使用转义字符

&lt;   < 小于号
&gt;   > 大于号
&amp;  & 和
&apos; ’ 单引号
&quot; " 双引号
或者使用<![CDATA[]]>
例:
<![CDATA[select * from CAT_TAB where id > #{beginId} and id < #{endId}]]>

猜你喜欢

转载自ququjioulai.iteye.com/blog/1925074