#2186·mybatis-3

MyBatis 忽略了 @Result 注解中的 typeHandler 设置,在 Mapper 中

作者: bskorka创建于 2021年2月24日更新于 2025年12月28日

@Select({ "SELECT LIMIT 1 n.kom_body as n_kom_body FROM table1 kn, table2 n, table3 k", "WHERE kn.reference = k.id AND k.id_out = n.id_out AND kn.id = #{id, jdbcType=INTEGER}" }) @Results({ @Result(column="n_kom_body", property="n_kom_body", typeHandler=UTF8TextTypeHandler.class, jdbcType=JdbcType.CLOB) }) String selectMessageContent(Integer id);

内容来源: mybatis/mybatis-3