美文网首页
BUG 解决记录 一

BUG 解决记录 一

作者: GYLEE | 来源:发表于2017-05-10 23:32 被阅读33次
攀登谷底攀登谷底

1. ITEM ONE

** 报错关键信息 **

2017-05-10 23:23:49.704 ERROR 6491 --- [0.1-8088-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer] with root cause

java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.Integer
Mapper 中的 SQL 语句如下:
 <select id="getStatisticDataSucessNum" resultMap="java.lang.Integer" parameterType="java.util.Map">
        SELECT COUNT(*)
        from t_order_sms
        WHERE result_code = 2000
        <if test="chId != null">
            and ch_id = #{chId ,jdbcType=VARCHAR}
        </if>
    </select>

** 问题所在 : ** resultMap ——> resultType

** 更改后代码 :**

 <select id="getStatisticDataSucessNum" resultType="java.lang.Integer" parameterType="java.util.Map">
        SELECT COUNT(*)
        from t_order_sms
        WHERE result_code = 2000
        <if test="chId != null">
            and ch_id = #{chId ,jdbcType=VARCHAR}
        </if>
    </select>

2. ITEM TWO

** 报错信息**

Ambiguous mapping. Cannot map ‘’********‘’

** 报错原因 **
多个 cotroller 中不能 同时映射一个 @RequestMapping("url") 中的 url

3. ITEM THREE

** 报错信息**

request method 'post' not supported

** 报错原因 **
前端的 url 在后台无对应的 controller
前端映射的 Url 在 Controller 中没有下没有相应的方法与之对应,更改 URL 使前端和后台业务的相同

相关文章

网友评论

      本文标题:BUG 解决记录 一

      本文链接:https://www.haomeiwen.com/subject/lqsntxtx.html