获取mysql text类型字段,mybaits返回null
<resultMap id="resultdata" type="com.demo.data1">
<result column="column1" jdbcType="VARCHAR" property="column1"/>
<result column="textcolumn2 " jdbcType="LONGVARCHAR" property="textcolumn2 "/>
</resultMap>
<select id="getall" resultMap="resultdata">
SELECT column1,textcolumn2 from table1
</select>
mybaits 对应的resultMap jdbcType="LONGVARCHAR"就可以了