一条sql如下:select * from user where id = #{user.id}
问题:用Java字符串的replaceAll将#{user.id}替换成具体指,但是具体正则表达式怎么写?
阿神2017-04-18 09:33:42
If you want to replace sql, just replace it directly. You can do it without regular expression. Normally, the #{user.id}
that appears in your sql needs to be replaced with your variable value. If you use regular expression, the performance will be too low.