CLOB 데이터를 String으로 파싱할 때 나타나는 에러
Mapper에서 CLOB 받아오는 방식 설정을 해야 한다
resultMap을 이용하여 CLOB 임을 명시하고 String으로 변환한다
<resultMap id="clobResultMap" type="hashmap">
...
<result property="TITLE" column="TITLE" />
<result property="CLOBDATA" column="CLOBDATA" jdbcType="CLOB" javaType="java.lang.String" />
...
</resultMap>
resultMap 을 위의 아이디를 이용하여 설정한다.
<select id="selectListClobData" parameterType="Clob" resultMap="clobResultMap">
select *
from ...
</select>
반응형
'👷삽질기록' 카테고리의 다른 글
로드밸런싱 설정 (1) | 2024.10.17 |
---|---|
스프링 스케줄러 중복 작동 (0) | 2023.03.21 |
XSS 취약점 조치 (0) | 2022.11.16 |
There is no getter for property named 'idx' in 'class java.lang.Integer (0) | 2022.09.07 |
java.sql.SQLSyntaxErrorException: ORA-00911: invalid character (0) | 2022.08.31 |
댓글