Mybatis 异常: The content of elements must consist of well-formed character data or markup
来源:互联网 发布:潜泳技巧 知乎 编辑:程序博客网 时间:2024/05/16 04:44
今天用mybatis弄一个小玩意,发现Mapper中以下语句报错,且会导致Tomcat无法正常启动
<select id="getAmountByTimePeriod" resultMap="seatHisAmountMap">
select
sum(nightFare) as nightAmount , sum(fare) as seatAmount ,#{0} as starttime,
#{1} as endtime
from nightfare
where
endtime >=#{0}
and
endtime <=#{1}
</select>
异常如下:
SAXParseException: The content of elements must consist of well-formed character data or markup.
百度一下得到一个匪夷所思的答案:
记住:在ibatis的配置文件中不能出现小于号
抱着试试看的态度试验了一下,代码改为:
<select id="getAmountByTimePeriod" resultMap="seatHisAmountMap">
select
sum(nightFare) as nightAmount , sum(fare) as seatAmount ,#{0} as starttime,
#{1} as endtime
from nightfare
where
endtime >=#{0}
and
#{1}>=endtime
</select>
问题竟然解决了....
- mybatis异常:The content of elements must consist of well-formed character data or markup.
- Mybatis 异常: The content of elements must consist of well-formed character data or markup
- Mybatis 异常: The content of elements must consist of well-formed character data or markup
- mybatis:The content of elements must consist of well-formed character data or markup
- mybatis 提示The content of elements must consist of well-formed character data or markup
- MyBatis报错:The content of elements must consist of well-formed character data or markup.
- mybatis 提示The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup.
- The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup
- ibatis遇到错误:The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup.
- The content of elements must consist of well-formed character data or markup.
- 【iBATIS】The content of elements must consist of well-formed character data or markup
- The content of elements must consist of well-formed character data or markup.
- realloc,malloc,calloc的区别
- NVIDIA JETSON TX1 开发者套件环境配置
- 抽象类
- FOF管理系列之一:什么是FOF?
- Poedu_C语言_Lesson20_20160923_分支语句
- Mybatis 异常: The content of elements must consist of well-formed character data or markup
- spark1.6+hadoop2.6集群HA搭建与参数解析
- HttpClient
- 烧脑电影:彗星来的那一夜(Coherence)
- Kotlin基础语法-属性(Property)与域(Field)
- input默认值设置
- 去除小数点
- cas源码改造-添加验证码(com.google.code.kaptcha)
- (快速入门1)简介