
发现很多不相关的注入错误时,很有可能是xxxMapper.xml文件 的namespace重名,或者id重名。

在shipingservice报错,可能是xml问题。
在web报错,可能是注入问题。
@RequestMapping("/area/getAreaThreshold")
@ResponseBody
List<CustomerAreaThreshold> getAreaThreshold(@RequestParam("areaId") Integer areaId);

本文探讨了在使用MyBatis框架时,Mapper XML文件中出现的namespace和id重名问题,此类问题可能导致不可预知的注入错误。文章还提供了一个具体的例子来说明如何定位和解决这类问题。

发现很多不相关的注入错误时,很有可能是xxxMapper.xml文件 的namespace重名,或者id重名。

在shipingservice报错,可能是xml问题。
在web报错,可能是注入问题。
@RequestMapping("/area/getAreaThreshold")
@ResponseBody
List<CustomerAreaThreshold> getAreaThreshold(@RequestParam("areaId") Integer areaId);

转载于:https://www.cnblogs.com/CESC4/p/7609469.html

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