码迷,mamicode.com
首页 > 数据库 > 详细

mybatis中xml的sql之test中文报错

时间:2017-04-08 23:51:24      阅读:271      评论:0      收藏:0      [点我收藏+]

标签:lin   and   mat   XML   bsp   number   tostring   pre   告诉   

在mybatis中sql,test中文报错( java.lang.NumberFormatException 这句话明确告诉了我们是数字格式异常)。需加.tostring().

<if test="bookName == ‘毛选集’.tostring() ">
	and b.book_Name like #{bookName} 
</if> 

  

mybatis中xml的sql之test中文报错

标签:lin   and   mat   XML   bsp   number   tostring   pre   告诉   

原文地址:http://www.cnblogs.com/ckxlovejava/p/6683453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!