Mybatis3 if judgment string abnormal writing method

Mybatis is our commonly used space judgment operation. There are common problems:

Wrong writing method: if test = "status = =" Y '"

Result: exception numberformatexception thrown! There are very few tips. I can't see the problem!

Correct writing: if test ='status = = "Y" '

It can also be written like this: if test = "status = = 'y' toString()”

Or you can write if test = 'status = = "Y"'

Supplement: mybatis3 judgment string

A strange problem was found in the process of using mybatis3. The judgment string must be in the specified format

Mapper is as follows:

report errors:

Just change it to this. This problem also applies to the if tag

The above is the abnormal writing method of mybatis3 if judgment string introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>