org.apache.ibatis.binding.BindingException: Parameter 'id' not found. Available parameters are [rec

Today, when using springBoot development projects met

“nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘userId’ not found. Available parameters are [goodsId, arg0, param1, param2]”的问题。

problem causes:

Success is not bound parameters

Solution:

Find mapper written (some people are dao) add "@Param" Notes binding parameters, such as:

SeckillOrder getSeckillOrderByUserIdGoodsId (@Param ( "userId" ) long userId, @Param ( "goodsId") long goodsId);
reboot the server.
----------------
Disclaimer: This article is the original article CSDN bloggers "MonkeyBrothers", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/MonkeyBrothers/article/details/80808915

Published 12 original articles · won praise 2 · Views 661

Guess you like

Origin blog.csdn.net/gonghaiyu/article/details/104323611