What is the difference between # and $in mybatis?
# means that precompilation is used to prevent sql injection. And $is not.
Use # to default the passed parameter to a string. While $will not, whatever is passed in is what is passed in.
$is generally used to pass in database objects, such as table names.
If you pass in a Date type, use #.
Ps: also encountered in the use of mybatis, statements within this symbol will not be treated as strings, but directly as sql statements, such as to execute a stored procedure.