Cognitive Technology Team
Jul 5, 2022 · Backend Development
Avoiding Unexpected Comma Formatting of Large Integers with MessageFormat in MyBatis SQL Generation
When using MessageFormat to inject integer parameters into dynamically generated MyBatis SQL, large numbers are automatically formatted with commas (e.g., 10000 becomes 10,000), which can break SQL statements, and the article explains why this happens and how to prevent it by converting numbers to strings before formatting.
DecimalFormatIntegerFormattingJava
0 likes · 3 min read