ibtais中把clob数据类型转换成string并展示到前台

1,在xml中定义一个resultMap

<resultMap class="com.aa.bb" id="clobToString">

<result column="clobColumn" jdbcType="CLOB" property="clobString"/>

</resultMap>

2,添加resultMap到xml的select语句中

<select id="find" parameterClass="com.aa.cc" resultMap="clobToString">

select * from aa

</select>

注意:<result>中已经指定property属性了,select就不需要as了。

原文地址:https://www.cnblogs.com/nizuimeiabc1/p/8777108.html