划重点:
column=“cellBorder” property=“cellBorder” jdbcType=“CLOB” typeHandler="org.apache.ibatis.type.ClobTypeHandler
oracle大字段CLOB转为String接收(mybatis)
<resultMap id="CellCoordinateMap" type="com.ids.test.dto.CellCoordinateDto" >
<result column="cellName" property="cellName" jdbcType="VARCHAR" />
<result column="cellBorder" property="cellBorder" jdbcType="CLOB" typeHandler="org.apache.ibatis.type.ClobTypeHandler"/>
</resultMap>
<select id="selectBorder" resultMap="CellCoordinateMap">
SELECT AOI_NAME AS cellName, OUTLINE AS cellBorder
FROM CHG_GPS_TEST
</select>
dto定义字段用String
@Data
public class CellCoordinateDto {
@ApiModelProperty(value = "小区名")
private String cellName;
@ApiModelProperty(value = "小区边缘经纬度")
private String cellBorder;
}