Mybatis passes in multiple parameters to mapper. And uses @param details to report an error

“nested   exception   is   org.apache.ibatis.binding.BindingException:   Parameter  ‘ orgName’   not   found.   Available   parameters   are  [ wxOrganizationAccount,   page,   param1,   param2]”,

This bug was fixed for a long time and finally found.

At the beginning, I thought that the @ param annotation was not written when multiple parameters were passed in, but I found that it was not right after writing,

“nested   exception   is   org.apache.ibatis.binding.BindingException:   Parameter  ‘ orgName’   not   found.   Available   parameters   are  [ wxOrganizationAccount,   page,   param1,   param2]”,

I want to add another parameter’s type field to an entity class, then save the parameter into the entity class, and then pass only one object in the process of passing the parameter. Of course, these are just my personal ideas. In the end, of course, they failed.

“nested   exception   is   org.apache.ibatis.binding.BindingException:   Parameter  ‘ orgName’   not   found.   Available   parameters   are  [ wxOrganizationAccount,   page,   param1]”,

It’s just missing a parameter, or it’s wrong. At this time, I was thinking that since it’s not the problem passed in, it might be the problem of value taking. Finally, I found that the value can’t be taken because it’s not accurate enough to get the value from the object!

Read More: