카테고리 없음

Spring clob 컬럼 declares multiple JSON fields named password 오류

베짱이챈 2022. 11. 20. 20:38
728x90
반응형

"class com.ibm.db2.jcc.DB2XADataSource declares multiple JSON fields named password"

clob은 Character Large Object

 

해당 오류는 중복된 컬럼명이 있는게 아니라

clob 데이터를 json 으로 변환할 수 없어서 나는 오류. (넘길 때 json 데이터로 변환해주고있기때문)

 

myBatis 쿼리에서 아래와 같이 select 태그 위에 써준다.

select 컬럼을 다 할 필요 없이 필요한 컬럼만 설정하면된다

<mapper namespace="com.xxxx.xxxx.xxxx">
    <resultMap type="HashMap" id="clobToString">
        <result property="컬럼명" column="컬럼명" jdbcType="CLOB" javaType="java.lang.String" />
    </resultMap>
    <select id="select태그식별자" resultType="HashMap" resultMap="clobToString">
        --쿼리
        ...

 

 

728x90
반응형