Today, I encountered a problem when using mybatis. When passing a string parameter, I encountered the following error:
Mapper.xml The code is as follows:
Error report when executing this method:
Maven is used for project jar management, and mybatis version is as follows (I use mybatis plus plug-in)
After browsing the data for half a day on the Internet, we found a solution. We need to use the_ The parameter is replaced uniformly. We modify the previous code as follows:
This is because of the version limitation of mybatis. You may not have this situation in some versions (I don’t understand very well here. Thank you )