Java Tech Enthusiast
Jul 1, 2024 · Backend Development
MyBatis OGNL Comparison Pitfall: Single Character vs String
The article reveals that MyBatis’s OGNL treats a single‑character literal like '1' as a Character, causing equality checks against String values in if tags to fail, and shows how using double quotes, toString(), or proper type conversion resolves the comparison pitfall.
DatabaseJavaMyBatis
0 likes · 4 min read