xml定义文件中是如下:
上面的这个SQL语句,产生的结果:
- select count(*)
- from u5standardization d
- where d.son_id = ?
- and d.son_type ='浼佹爣'
-----------------------------------------------------
xml编码问题咯
然后,我对xml文件 的抬头:
<?xml version="1.0" encoding="UTF-8"?>
改为:
<?xml version="1.0" encoding="gbk"?>
这样输出的结果就正常了
- select count(*)
- from u5standardization d
- where d.son_id = ?
- and d.son_type ='企标'
----------------------------------------------------
最近在iBatis网站上看到解决办法了
是读xml的时候出了问题
要求版本2.3
Resources.setCharset(Charset.forName("UTF-8"));
Reader reader = Resources.geResources.setCharset(Charset.forName("UTF-8"));
FROM:http://www.iteye.com/topic/85659#301449