ibatis No type handler could be found

异常堆栈主要如下:

--- Check the result mapping for the 'x' property.

No type handler could be found to map the property 'x' to the column 'x'. One or both of the types, or the combination of types is not supported.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in a/b/c.xml.

--- Check the result mapping for the 'x' property.

原因:对应resultClass 中有一个字段

对应表中的jdbcType是CLOB,在dto中的javaType为java.lang.String

但是dto中的x属性有两set方法,即

setX(Map), setX(String)

ibatis调错了setX(Map),正 确的应该 调setX(String)

解决方法:重全名setX(map)为toXMap(Map);

ibatis No type handler could be found_第1张图片

你可能感兴趣的:(ibatis No type handler could be found)