(急)MyBatis中blob类型如何映射
老报错啊,直接上图,求大神!注:auctionpic是blob类型<resultMaptype="entity.Auction"id="EmpResultMap"><id...
老报错啊,直接上图,求大神! 注:auctionpic是blob类型
<resultMap type="entity.Auction" id="EmpResultMap">
<id property="auctionid" column="auctionid"/>
<result property="auctionname" column="auctionname"></result>
<result property="auctionstartprice" column="auctionstartprice"></result>
<result property="auctionupset" column="auctionupset"></result>
<result property="auctionstarttime" column="auctionstarttime"></result>
<result property="auctionendtime" column="auctionendtime"></result>
<result property="auctionpic" column="auctionpic"></result>
<result property="auctionpictype" column="auctionpictype"></result>
<result property="auctiondesc" column="auctiondesc"></result>
<result property="picName" column="picName"></result>
<collection property="auctionrecords" column="auctionid" javaType="java.util.Map" ofType="entity.Auctionrecord" select="getAuctionRecordByAuctionID" />
</resultMap>
然后就报这个错误
Caused by: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalStateException: No typehandler found for property auctionpic
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:113)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:88)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:317)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:104)
... 4 more 展开
<resultMap type="entity.Auction" id="EmpResultMap">
<id property="auctionid" column="auctionid"/>
<result property="auctionname" column="auctionname"></result>
<result property="auctionstartprice" column="auctionstartprice"></result>
<result property="auctionupset" column="auctionupset"></result>
<result property="auctionstarttime" column="auctionstarttime"></result>
<result property="auctionendtime" column="auctionendtime"></result>
<result property="auctionpic" column="auctionpic"></result>
<result property="auctionpictype" column="auctionpictype"></result>
<result property="auctiondesc" column="auctiondesc"></result>
<result property="picName" column="picName"></result>
<collection property="auctionrecords" column="auctionid" javaType="java.util.Map" ofType="entity.Auctionrecord" select="getAuctionRecordByAuctionID" />
</resultMap>
然后就报这个错误
Caused by: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalStateException: No typehandler found for property auctionpic
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:113)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:88)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:317)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:104)
... 4 more 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询