页面报错信息:Failed to load resource: the server responded with a status of 500 (Internal Server Error)
报错截图:
1、排查报错第一步:
根据后台打印信息我们可以找到报错源。如图所示:

排查报错第二步:
将该语句try…catch…找到报错原因

重新运行,得出报错信息如下:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘uid’ not found. Available parameters are [arg1, arg0, param1, param2]
报错截图:

该报错信息在上一篇文章中有提到过。链接地址:https://blog.youkuaiyun.com/csdn_wuxinzy/article/details/105478182
2、解决办法:在该方法的参数前面加上@Param(“变量名”)

重新启动项目:成功。

本文详细介绍了在使用MyBatis框架时遇到的参数绑定异常问题,具体表现为找不到指定参数'uid',并提供了有效的解决方案,即通过使用@Param注解明确参数名称。
5万+

被折叠的 条评论
为什么被折叠?



