请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

前台list出现500异常

//img1.sycdn.imooc.com//szimg/5aafc3c10001b41708720312.jpg

1
</ pre> <p> <b>根本原因</ b> </ p> <pre> org.mybatis.spring.MyBatisSystemException:嵌套的异常是org.apache.ibatis.binding.BindingException:找不到参数'categoryIdList' 。可用参数是[CategoryIdList,productName,param1,param2]

日志信息

1
2
3
4
5
6
7
[22:03:58.810][DEBUG][c.m.d.C.selectCategoryChildrenByParentId][http-nio-8088-exec-4] ==>  Preparing: SELECT id, parent_id, name, status, sort_order, create_time, update_time FROM miao_category WHERE parent_id=? 
[22:03:58.810][DEBUG][c.m.d.C.selectCategoryChildrenByParentId][http-nio-8088-exec-4] ==> Parameters: 100006(Integer)
[22:03:58.811][DEBUG][c.m.d.C.selectCategoryChildrenByParentId][http-nio-8088-exec-4] <==      Total: 0
[22:03:58.811][DEBUG][org.mybatis.spring.SqlSessionUtils][http-nio-8088-exec-4] Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3f26f57d]
[22:03:58.820][DEBUG][org.mybatis.spring.SqlSessionUtils][http-nio-8088-exec-4] Creating a new SqlSession
[22:03:58.821][DEBUG][org.mybatis.spring.SqlSessionUtils][http-nio-8088-exec-4] SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@42416f45] was not registered for synchronization because synchronization is not active
[22:03:58.870][DEBUG][org.mybatis.spring.SqlSessionUtils][http-nio-8088-exec-4] Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@42416f45]


正在回答

插入代码

3回答

你好,同学 500 就是服务器异常啦, 你这个异常应该发生在mybatis,你把后端的异常日志 全部发这里来,记得排版一下。另外目前看有限的线索,是否可以检查一下这个办法,在mybatis的interface绑定数据时候 参数是否有问题。

包括注解是否加全,位置是否对应好。

0 回复 有任何疑惑可以回复我~
  • 提问者 北极猫_ #1
    非常感谢!老师发现的问题果然精准
    回复 有任何疑惑可以回复我~ 2018-03-20 09:36:29
提问者 北极猫_ 2018-03-20 09:36:03

//img1.sycdn.imooc.com//szimg/5ab065450001b72310670100.jpg

破案了, productMapper写错

0 回复 有任何疑惑可以回复我~
about_blank 2018-03-19 22:15:05

CategoryIdList debug 看下传到xml 的声明贴一下?

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号