When logging in, I found that I could log in with different upper and lower cases of the account.
Mybatis query code is as follows
<select parameterType="" resultType=""> select <include ref /> from <include ref /> <where> userName=#{userName} </where> </select>
After multiple breakpoint queries, it was found that the above xml file was not written correctly.
userName=#{userName}
This write does not match upper and lower case.
Solution: Add a BINARY
<select parameterType="" resultType=""> select <include ref /> from <include ref /> <where> BINARY userId=#{uid} </where> </select>
Supplementary knowledge:Mybatis case insensitive problem
The cause is that two identical field names are defined in the Java entity class, which only distinguish the case of one of the letters. For example, (cellcode, cellCode) is queried in the SQL statement of Myatis. After watching the data returned by the front desk, I found that it is different from the expected data. Later I found that it was a small bug in mybatis caused by case-insensitive program.
In the application, you must pay attention to not defining fields like (cellcode, cellCode) in the entity class for de-distinguishing
In the above Mybatis query, case sensitivity is all the content I share with you. I hope you can give you a reference and I hope you support me more.