使用 sql 占位符替换字符串时会带上单引号 ''
select * from #{tableName} where name = #{name};
用#{}:sql语句错误, select * from 'user' where name ='mary';
用${}:sql语句正确, select * from user where name ='mary';
京公网安备 11010502049817号