Is there a way to directly return a byte[] result (reading from a blob column)?
This works fine: XML: <select id="selectContent" resultType="com.acme.ByteArrayDto"> select content from manual where key = #{key,jdbcType=VARCHAR} </select> Interface: ByteArrayDto selectContent(@Param("key") String key); Groovy class: package com.acme.dtos class ByteArrayDto { byte[] content; } However it would be nicer to do away with the DTO wrapper: XML: <select id="selectContent" resultType="byte[]"> select content from manual where key = #{key,jdbcType=VARCHAR} </select> Interface: byte[] selectContent(@Param("key") String key); Unfortunately that results in a "no class def found" for "byte[]". Is there a way to make this work?