亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

mybatis 配置文件錯誤

mybatis 配置文件錯誤

XFE_星城前端_Peter 2016-02-12 22:59:09
<!--?無意之中,再一次打開我的配置文件出現了一個錯誤,標注在mapper標簽開始的位置: ????錯誤的內容為:The?content?of?element?type?"mapper"?must?match?"(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*| ?select*)+". ???在線急等求解答! ?--> <?xml?version="1.0"?encoding="UTF-8"?> <!DOCTYPE?mapper ??PUBLIC?"-//mybatis.org//DTD?Mapper?3.0//EN" ??"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper??namespace="dao.JaigeDao"> <!--?添加新數據?--> <insert?id="SaveJiage"?parameterType="Jiage"> insert?into xcphonefix.jiage(jgnum,pjid,xhid) values (#{jgnum},#{pjid},#{xhid}) </insert> <!--?分頁查詢?start?--> <!--?分頁查詢所有數據?--> <select?id="indexSee"?resultType="Jiage"?parameterType="map"> select ?*? from?jiage? where?pjid?=?#{topPJid}?and?xhid?#{topXHid} limit?#{0},#{0} </select> <!--?返回的價格數據集合?--> <resuleMap?type="Jiage"?id="JiageMapper"> <id?column="jgid"?property="jgid"/> <association?property="xinghao"?column="xhid"?javaType="Xinghao"> <id?column="xhid"?property="xhid"/> <association?property="pinpai"?column="ppid"?javaType="Pinpai"> <id?column="ppid"?property="ppid"/> </association> </association> <association?property="peijian"?column="pjid"?javaType="Peijian"> <id?column="pjid"?property="pjid"/> </association> </resuleMap> <!--?更新數據?start?--> <!--?拉取展示數據,用以編輯?--> <select?id="SeeAllJiage"?resultType="JiageMapper"?parameterType="map"?> select?jgid,jgnum,pjname,xhname,ppname,jgShow from?xcphonefix.jiage?j? left?join?xcphonefix.peijian?pj?on?j.pjid=pj.pjid left?join?xcphonefix.xinghao?xh?on?j.xhid=xh.xhid order?by?pubdate?DESC? limit?#{pagebegin},#{pagesize} </select> <!--?拉取要更新的數據?--> <select?id="SeeOneJiage"?resultType="Jiage"?parameterType="int"> select jgid,jgnum,pjid,xhid,jgShow from?xcphonefix.jiage?where?jgid=#{jgid} </select> <!--?更新數據?--> <update?id="updateJiage"?parameterType="map"> update?? set?jgnum=#{jgnum},pjid=#{pjid},xhid=#{xhid},jgShow=#{jgShow} where?jgid=#{jgid} </update> <!--?更新數據?end?--> <!--?刪除數據?start?--> <delete?id="deleteJiage"> delete?from?xcphonefix.jiage? where?jgid=#{jgid} </delete> <!--?刪除數據?end?--> </mapper>
查看完整描述

1 回答

?
HansonQ

TA貢獻223條經驗 獲得超56個贊

這個提示是因為你文件中的配置順序沒要按照它提示的那樣,
The?content?of?element?type?"mapper"?must?match?"(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|
?select*)
?這個提示是要求mybatis的配置文件內容要按照這個順序。


查看完整回答
1 反對 回復 2016-02-16
  • 新睿1st
    新睿1st
    另有一個mapper文件,沒有按照這個順序,編譯能通過。。
  • kuanglang
    kuanglang
    我的也不行啊 怎么解決的啊
  • qq_橡樹_10
    qq_橡樹_10
    樓主的回答很精辟,我也遇到這種情況,我是把select寫在了前面,按照順序我把select寫在了最后,問題解決,多謝
  • 1 回答
  • 0 關注
  • 12412 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號