Home > Back-end >  The mybatis # and the difference between the $, to avoid the problem of SQL injection
The mybatis # and the difference between the $, to avoid the problem of SQL injection

Time:02-28

# 1. Will the incoming data as a string, to the incoming data automatically add a double quotation marks,
2. $the incoming data directly show the generated in SQL,
MyBatis enabled precompiled function, before the SQL execution, will be sending the above SQL database compiled; Execution time, using compiled SQL directly, replace placeholders "?" Is ok, because SQL injection can only work on compilation process, so this way is good to avoid the problem of SQL injection,
  • Related